diff options
-rw-r--r-- | examples/sshnetcat.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/sshnetcat.c b/examples/sshnetcat.c index 052cabf4..67bb1ad6 100644 --- a/examples/sshnetcat.c +++ b/examples/sshnetcat.c @@ -143,13 +143,14 @@ static void select_loop(ssh_session session,ssh_channel channel){ if(lus==0){ channel_free(channel); channel=channels[0]=NULL; - } else + } else { ret = write(2, buffer, lus); if (ret < 0) { fprintf(stderr, "Error writing to stderr: %s", strerror(errno)); return; } + } } } if(channel && channel_is_closed(channel)){ |