Skip to content

Commit

Permalink
Fix voice websocket loop termination
Browse files Browse the repository at this point in the history
The websocket loop for voice events is terminated whenever a websocket
message is successfully sent. This is caused by a bug that was
introduced in
c8536c1#diff-6a8a0bad68abd05790cdc2c2ba043ec6L457,
due to an improperly implemented clippy lint.
  • Loading branch information
indiv0 authored and Zeyla Hellyer committed Jan 25, 2018
1 parent e4612ac commit 55fa37a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/voice/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ fn start_threads(client: Arc<Mutex<Client>>, udp: &UdpSocket) -> Result<ThreadIt
},
};

if tx_clone.send(ReceiverStatus::Websocket(msg)).is_ok() {
if tx_clone.send(ReceiverStatus::Websocket(msg)).is_err() {
return;
}
}
Expand Down

0 comments on commit 55fa37a

Please sign in to comment.