mirror of
https://github.com/nmap/nmap.git
synced 2026-05-13 08:46:45 +00:00
Ncat DTLS: shutdown connection on stdin EOF
This commit is contained in:
parent
62206c623a
commit
fd46d288c4
1 changed files with 2 additions and 2 deletions
|
|
@ -402,13 +402,13 @@ restart_fd_loop:
|
|||
} else {
|
||||
/* Read from stdin and write to all clients. */
|
||||
rc = read_stdin(&qtv);
|
||||
if (rc == 0 && type == SOCK_STREAM) {
|
||||
if (rc == 0 && (type == SOCK_STREAM || o.ssl)) {
|
||||
if (!o.noshutdown) shutdown_sockets(SHUT_WR);
|
||||
if (o.quitafter == 0 && (o.proto != IPPROTO_TCP || (o.proto == IPPROTO_TCP && o.sendonly))) {
|
||||
/* There will be nothing more to send. If we're not
|
||||
receiving anything, we can quit here. */
|
||||
return 0;
|
||||
}
|
||||
if (!o.noshutdown) shutdown_sockets(SHUT_WR);
|
||||
}
|
||||
if (rc < 0)
|
||||
return 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue