aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Simons <jon@jonsimons.org>2018-06-27 21:38:33 -0700
committerJon Simons <jon@jonsimons.org>2018-06-27 21:38:35 -0700
commitdeb7630c67ab5fc5ea346ded0c3341f705f15399 (patch)
tree5edc431b4dd007096c8f4ae622a5e02a345fdff5
parentcbd9569b998c272688a47837b54315fc280b045d (diff)
downloadlibssh-deb7630c67ab5fc5ea346ded0c3341f705f15399.tar.gz
libssh-deb7630c67ab5fc5ea346ded0c3341f705f15399.tar.xz
libssh-deb7630c67ab5fc5ea346ded0c3341f705f15399.zip
pkd: log but ignore ungraceful client disconnects
Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r--tests/pkd/pkd_daemon.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/pkd/pkd_daemon.c b/tests/pkd/pkd_daemon.c
index a128c8e9..fc14d33c 100644
--- a/tests/pkd/pkd_daemon.c
+++ b/tests/pkd/pkd_daemon.c
@@ -369,7 +369,9 @@ static int pkd_exec_hello(int fd, struct pkd_daemon_args *args) {
(pkd_state.close_received == 0)) {
rc = ssh_event_dopoll(e, 1000 /* milliseconds */);
if (rc == SSH_ERROR) {
- pkderr("ssh_event_dopoll for eof + close: %s\n", ssh_get_error(s));
+ /* log, but don't consider this fatal */
+ pkdout("ssh_event_dopoll for eof + close: %s\n", ssh_get_error(s));
+ rc = 0;
break;
} else {
rc = 0;
@@ -380,7 +382,9 @@ static int pkd_exec_hello(int fd, struct pkd_daemon_args *args) {
(ssh_is_connected(s))) {
rc = ssh_event_dopoll(e, 1000 /* milliseconds */);
if (rc == SSH_ERROR) {
- pkderr("ssh_event_dopoll for session connection: %s\n", ssh_get_error(s));
+ /* log, but don't consider this fatal */
+ pkdout("ssh_event_dopoll for session connection: %s\n", ssh_get_error(s));
+ rc = 0;
break;
} else {
rc = 0;