--- extern/lwip/main/src/api/api_msg.c 2004-11-17 11:51:12.000000000 +1100 +++ main/lwip/api/api_msg.c 2004-11-23 16:49:58.000000000 +1100 @@ -255,11 +255,12 @@ accept_function(void *arg, struct tcp_pc if (conn->callback) { (*conn->callback)(conn, NETCONN_EVT_RCVPLUS, 0); - /* We have to set the callback here even though - * the new socket is unknown. Mark the socket as -1. */ - newconn->callback = conn->callback; - newconn->socket = -1; } + /* We have to set the callback here even though + * the new socket is unknown. Mark the socket as -1. */ + newconn->callback = conn->callback; + newconn->socket = -1; + newconn->recv_avail = 0; sys_mbox_post(mbox, newconn); return ERR_OK;