From 5c1af60e194e434738f3a31a284fa182e14c814f Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 15 Apr 2016 00:35:47 +0300 Subject: [PATCH] extmod/modlwip: More debug messages for various edge conditions. --- extmod/modlwip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extmod/modlwip.c b/extmod/modlwip.c index 73beeb0715..4499aa9b37 100644 --- a/extmod/modlwip.c +++ b/extmod/modlwip.c @@ -309,6 +309,7 @@ STATIC err_t _lwip_tcp_accept(void *arg, struct tcp_pcb *newpcb, err_t err) { tcp_recv(newpcb, _lwip_tcp_recv_unaccepted); if (socket->incoming.connection != NULL) { + DEBUG_printf("_lwip_tcp_accept: Tried to queue >1 pcb waiting for accept\n"); // We need to handle this better. This single-level structure makes the // backlog setting kind of pointless. FIXME return ERR_BUF; @@ -579,6 +580,7 @@ STATIC mp_obj_t lwip_socket_close(mp_obj_t self_in) { socket_is_listener = true; } if (tcp_close(socket->pcb.tcp) != ERR_OK) { + DEBUG_printf("lwip_close: had to call tcp_abort()\n"); tcp_abort(socket->pcb.tcp); } break;