mirror of
https://github.com/nmap/nmap.git
synced 2026-07-11 02:34:55 +00:00
Simplify connect-mode stdin EOF handling.
This commit is contained in:
parent
9a10429474
commit
81c777abfd
1 changed files with 3 additions and 5 deletions
|
|
@ -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)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue