[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 9/9] pkd: log but ignore ungraceful client disconnects


Signed-off-by: Jon Simons <jon@xxxxxxxxxxxxx>
---
 tests/pkd/pkd_daemon.c | 8 ++++++--
 1 file 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;
-- 
2.14.1


References:
[PATCH 0/9] pkd: fixups for the 0.8 releaseJon Simons <jon@xxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org