Skip to content

Commit

Permalink
Remove extra lock wait
Browse files Browse the repository at this point in the history
  • Loading branch information
GothAck committed Nov 23, 2021
1 parent 74d0bdf commit 7f2311d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ impl<T: AsyncRead + AsyncWrite + Send + Unpin + 'static> MuxSocket<T> {
}
}
Flag::Rst => {
if matches!(*self.state.read().await, PortState::Closed | PortState::Ack) {
if matches!(state, PortState::Closed | PortState::Ack) {
if let Some(stream_sender) = self.external_stream_sender.write().await.as_ref()
{
if let Err(error) = stream_sender
Expand Down

0 comments on commit 7f2311d

Please sign in to comment.