We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4b89fd0 commit 149cabaCopy full SHA for 149caba
examples/rtic-echo.rs
@@ -32,7 +32,7 @@ mod app {
32
use smoltcp::{
33
iface::{self, Interface, SocketHandle},
34
socket::TcpSocket,
35
- socket::TcpSocketBuffer,
+ socket::{TcpSocketBuffer, TcpState},
36
wire::EthernetAddress,
37
};
38
@@ -164,7 +164,7 @@ mod app {
164
}
165
166
167
- if !socket.is_listening() && !socket.is_open() {
+ if !socket.is_listening() && !socket.is_open() || socket.state() == TcpState::CloseWait {
168
socket.abort();
169
socket.listen(crate::ADDRESS).ok();
170
defmt::warn!("Disconnected... Reopening listening socket.");
0 commit comments