Skip to content

Commit 24ce2ba

Browse files
committed
fixup! tests/lwip: adapt test to use sock_async
1 parent 54069b1 commit 24ce2ba

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/lwip/tcp.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,10 @@ static void _tcp_recv(sock_tcp_t *sock, sock_async_flags_t flags)
5151
{
5252
sock_tcp_ep_t client;
5353

54-
sock_tcp_get_remote(sock, &client);
54+
if (sock_tcp_get_remote(sock, &client) < 0) {
55+
/* socket was disconnected between event firing and this handler */
56+
return;
57+
}
5558
#ifdef MODULE_LWIP_IPV6
5659
ipv6_addr_to_str(_addr_str, (ipv6_addr_t *)&client.addr.ipv6,
5760
sizeof(_addr_str));

0 commit comments

Comments
 (0)