mirror of
https://github.com/nmap/nmap.git
synced 2026-06-29 12:44:00 +00:00
Avoid timeout on STDIN socket. Fixes #3291.
Windows enforces a 120-second timeout for sockets in FIN_WAIT_2, so the STDIN socket was being forcibly closed after 2 minutes.
This commit is contained in:
parent
ebdec1fa3e
commit
e9861daf84
1 changed files with 0 additions and 6 deletions
|
|
@ -115,8 +115,6 @@ static DWORD WINAPI win_stdin_thread_func(void *data) {
|
|||
|
||||
closesocket(tdata->socket_l);
|
||||
tdata->socket_l = INVALID_SOCKET;
|
||||
if (SOCKET_ERROR == shutdown(socket_w, SD_RECEIVE))
|
||||
goto ThreadCleanup;
|
||||
|
||||
for (;;) {
|
||||
if (ReadFile(tdata->stdin_handle, buffer, sizeof(buffer), &n, NULL) == 0)
|
||||
|
|
@ -236,10 +234,6 @@ int win_stdin_start_thread(void) {
|
|||
//fprintf(stderr, "connect error: %d", socket_errno());
|
||||
break;
|
||||
}
|
||||
if (SOCKET_ERROR == shutdown(socket_r, SD_SEND)) {
|
||||
//fprintf(stderr, "shutdown error: %d", socket_errno());
|
||||
break;
|
||||
}
|
||||
|
||||
/* Set the stdin handle to read from the socket. */
|
||||
if (SetStdHandle(STD_INPUT_HANDLE, (HANDLE) socket_r) == 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue