We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 54069b1 commit 24ce2baCopy full SHA for 24ce2ba
1 file changed
tests/lwip/tcp.c
@@ -51,7 +51,10 @@ static void _tcp_recv(sock_tcp_t *sock, sock_async_flags_t flags)
51
{
52
sock_tcp_ep_t client;
53
54
- sock_tcp_get_remote(sock, &client);
+ if (sock_tcp_get_remote(sock, &client) < 0) {
55
+ /* socket was disconnected between event firing and this handler */
56
+ return;
57
+ }
58
#ifdef MODULE_LWIP_IPV6
59
ipv6_addr_to_str(_addr_str, (ipv6_addr_t *)&client.addr.ipv6,
60
sizeof(_addr_str));
0 commit comments