This commit is contained in:
Anatoly Yakovenko
2018-05-30 12:07:28 -07:00
committed by Greg Fitzgerald
parent f5eedd2d19
commit e44e81bd17
5 changed files with 28 additions and 56 deletions

View File

@@ -29,8 +29,7 @@ fn recv_loop(
let msgs = re.allocate();
let msgs_ = msgs.clone();
loop {
match msgs
.write()
match msgs.write()
.expect("write lock in fn recv_loop")
.recv_from(sock)
{
@@ -201,8 +200,7 @@ fn recv_window(
) -> Result<()> {
let timer = Duration::from_millis(200);
let mut dq = r.recv_timeout(timer)?;
let leader_id = crdt
.read()
let leader_id = crdt.read()
.expect("'crdt' read lock in fn recv_window")
.leader_data()
.id;