bin/ircd2: refactor locking a mutex

This commit is contained in:
Dastan-glitch
2023-02-23 03:17:46 +03:00
parent b5acec7e82
commit 5a4ca9bcdc

View File

@@ -210,11 +210,10 @@ impl IrcServer {
loop {
let (msg, subscription_id) = recv.recv().await?;
let prev = model.lock().await.get_head_hash();
match msg {
NotifierMsg::Privmsg(msg) => {
let event = Event {
previous_event_hash: prev,
previous_event_hash: model.lock().await.get_head_hash(),
action: msg.clone(),
timestamp: get_current_time(),
read_confirms: 0,