hubd crash when disconnecting and reconnecting (kill peer)
qaul-hubd
crashes when a peer disconnects and then reconnects on the same port.
May 25 10:25:45.209 INFO qaul_hubd: Initialised logger: welcome to qauld!
qaul-hubd Listening for: Ok(V4(0.0.0.0:9000))
May 25 10:25:45.210 DEBUG netmod_tcp::socket: , Attempting connection to peer '127.0.0.1:9001'
May 25 10:25:45.211 ERROR netmod_tcp::socket: Failed to connect to peer '127.0.0.1:9001': Connection refused (os error 111)
qaul-hubd Full packet `Hello { port: 9001 }` received!
May 25 10:25:49.910 DEBUG netmod_tcp::socket: , Attempting connection to peer '127.0.0.1:9001'
May 25 10:25:49.910 DEBUG netmod_tcp::socket: Successfully connected to peer '127.0.0.1:9001'
May 25 10:25:49.910 DEBUG send_packet{id="qaul-hubd"}: netmod_tcp::socket: qaul-hubd Sending HELLO to "127.0.0.1:9001"
qaul-hubd Full packet `KeepAlive` received!
May 25 10:25:51.267 ERROR netmod_tcp::socket: Failed to parse incoming message: Kind(UnexpectedEof)... dropping connection
qaul-hubd Exited read-work loop!
qaul-hubd Replying to keep-alive!
May 25 10:25:51.911 DEBUG send_packet{id="qaul-hubd"}: netmod_tcp::socket: qaul-hubd Sending KEEP-ALIVE to "127.0.0.1:9001"
qaul-hubd Full packet `Hello { port: 9001 }` received!
thread 'async-std/executor' panicked at 'called `Option::unwrap()` on a `None` value', netmod-tcp/src/socket.rs:194:34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
zsh: abort (core dumped) cargo run -p qaul-hubd -- --peers clients/hubd/peers2.txt --port 9000
This can also happen even through multiple retries:
May 25 10:26:46.370 INFO qaul_hubd: Initialised logger: welcome to qauld!
qaul-hubd Listening for: Ok(V4(0.0.0.0:9000))
May 25 10:26:46.371 DEBUG netmod_tcp::socket: , Attempting connection to peer '127.0.0.1:9001'
May 25 10:26:46.371 ERROR netmod_tcp::socket: Failed to connect to peer '127.0.0.1:9001': Connection refused (os error 111)
qaul-hubd Full packet `Hello { port: 9001 }` received!
May 25 10:26:48.066 DEBUG netmod_tcp::socket: , Attempting connection to peer '127.0.0.1:9001'
May 25 10:26:48.067 DEBUG netmod_tcp::socket: Successfully connected to peer '127.0.0.1:9001'
May 25 10:26:48.067 DEBUG send_packet{id="qaul-hubd"}: netmod_tcp::socket: qaul-hubd Sending HELLO to "127.0.0.1:9001"
qaul-hubd Full packet `KeepAlive` received!
qaul-hubd Replying to keep-alive!
May 25 10:26:50.068 DEBUG send_packet{id="qaul-hubd"}: netmod_tcp::socket: qaul-hubd Sending KEEP-ALIVE to "127.0.0.1:9001"
qaul-hubd Full packet `KeepAlive` received!
May 25 10:26:52.456 ERROR netmod_tcp::socket: Failed to parse incoming message: Kind(UnexpectedEof)... dropping connection
qaul-hubd Exited read-work loop!
qaul-hubd Replying to keep-alive!
May 25 10:26:54.070 DEBUG send_packet{id="qaul-hubd"}: netmod_tcp::socket: qaul-hubd Sending KEEP-ALIVE to "127.0.0.1:9001"
May 25 10:27:16.372 DEBUG netmod_tcp::socket: Retry timeout expired for peer '127.0.0.1:9001', proceeding with retry 0
May 25 10:27:16.372 DEBUG netmod_tcp::socket: Peer '127.0.0.1:9001' (ID 0) appears to already have a connection. Ceasing reconnect loop.
qaul-hubd Full packet `Hello { port: 9001 }` received!
thread 'async-std/executor' panicked at 'called `Option::unwrap()` on a `None` value', netmod-tcp/src/socket.rs:194:34
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
zsh: abort (core dumped) cargo run -p qaul-hubd -- --peers clients/hubd/peers2.txt --port 9000