Fix: unchoke now sent after Bitfield properly, not before

This commit is contained in:
Igor Katson 2024-08-31 12:09:36 +01:00
parent 3f014ee80a
commit b60850946e
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
2 changed files with 6 additions and 3 deletions

View file

@ -892,8 +892,6 @@ impl<'a> PeerConnectionHandler for &'a PeerHandler {
fn on_handshake<B>(&self, handshake: Handshake<B>) -> anyhow::Result<()> {
self.state.set_peer_live(self.addr, handshake);
self.tx
.send(WriterRequest::Message(MessageOwned::Unchoke))?;
Ok(())
}