aboutsummaryrefslogtreecommitdiff
path: root/nc.c
diff options
context:
space:
mode:
Diffstat (limited to 'nc.c')
-rw-r--r--nc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/nc.c b/nc.c
index 805bbd4d8..84c1a815e 100644
--- a/nc.c
+++ b/nc.c
@@ -111,6 +111,8 @@ int nc_main(int argc, char **argv)
exit(0);
ofd = fileno(stdout);
} else {
+ if (nread == 0)
+ shutdown(sfd, 1);
ofd = sfd;
}