Update NetAdhocPtp_Close

This commit is contained in:
AdamN 2024-06-29 00:46:44 +07:00 committed by GitHub
parent 2222254f3e
commit 9e8e43f7b7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3922,7 +3922,7 @@ int NetAdhocPtp_Close(int id, int unknown) {
sl.l_onoff = 1; // non-zero value enables linger option in kernel
sl.l_linger = 0; // timeout interval in seconds
setsockopt(socket->data.ptp.id, SOL_SOCKET, SO_LINGER, (const char*)&sl, sizeof(sl));
shutdown(socket->data.ptp.id, SD_BOTH);
shutdown(socket->data.ptp.id, SD_RECEIVE);
closesocket(socket->data.ptp.id);
// Remove Port Forward from Router