mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
bin/ircd2: refactor locking a mutex
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user