mirror of
https://github.com/nmap/nmap.git
synced 2026-01-03 05:09:14 +00:00
Simplify connect-mode stdin EOF handling.
This commit is contained in:
@@ -785,12 +785,10 @@ static void read_stdin_handler(nsock_pool nsp, nsock_event evt, void *data)
|
||||
ncat_assert(type == NSE_TYPE_READ);
|
||||
|
||||
if (status == NSE_STATUS_EOF) {
|
||||
if (o.sendonly) {
|
||||
/* In --send-only mode, exit after EOF on stdin. */
|
||||
shutdown(nsi_getsd(cs.sock_nsi), SHUT_WR);
|
||||
/* In --send-only mode, exit after EOF on stdin. */
|
||||
if (o.sendonly)
|
||||
nsock_loop_quit(nsp);
|
||||
} else {
|
||||
shutdown(nsi_getsd(cs.sock_nsi), SHUT_WR);
|
||||
}
|
||||
return;
|
||||
} else if (status == NSE_STATUS_ERROR) {
|
||||
loguser("%s.\n", socket_strerror(nse_errorcode(evt)));
|
||||
|
||||
Reference in New Issue
Block a user