properly close sockets, so that they can be reused
This commit is contained in:
parent
7d2b3bbf76
commit
9485a4e8c0
|
@ -766,9 +766,12 @@ void HandleTCPFrame(u8* data, int len)
|
||||||
|
|
||||||
if (flags & 0x001) // FIN
|
if (flags & 0x001) // FIN
|
||||||
{
|
{
|
||||||
// TODO: cleverer termination?
|
// TODO: timeout etc
|
||||||
// also timeout etc
|
printf("TCP: socket %d closing\n", sockid);
|
||||||
|
|
||||||
sock->Status = 0;
|
sock->Status = 0;
|
||||||
|
closesocket(sock->Backend);
|
||||||
|
sock->Backend = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue