When an application calls utcp_close() on a previously established
connection, the utcp_connection is kept around to handle FIN(ACK)
packets. However, the peer could still send some data, which should not
trigger the receive callback.
int utcp_close(struct utcp_connection *c) {
if(utcp_shutdown(c, SHUT_RDWR))
return -1;
+ c->recv = NULL;
+ c->poll = NULL;
c->reapable = true;
return 0;
}
return -1;
}
+ c->recv = NULL;
+ c->poll = NULL;
c->reapable = true;
switch(c->state) {