From 58580a5c0d01544fef43923c87237ffae02ca190 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net> Date: Mon, 15 Mar 2021 03:16:19 -0400 Subject: [PATCH] Increase flush write timeout for SSH. During YModem-G transfers, the previous 5-second timeout was exceeded. --- src/sbbs3/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp index a462f3ee8e..09ca788a81 100644 --- a/src/sbbs3/main.cpp +++ b/src/sbbs3/main.cpp @@ -2452,7 +2452,11 @@ void output_thread(void* arg) } else { // READ = WRITE TIMEOUT HACK... REMOVE WHEN FIXED - if(cryptStatusError(err=cryptSetAttribute(sbbs->ssh_session, CRYPT_OPTION_NET_WRITETIMEOUT, 5))) + /* This sets the write timeout for the flush, then sets it to zero + * afterward... presumably because the read timeout gets set to + * what the current write timeout is. + */ + if(cryptStatusError(err=cryptSetAttribute(sbbs->ssh_session, CRYPT_OPTION_NET_WRITETIMEOUT, 30))) GCESSTR(err, node, LOG_WARNING, sbbs->ssh_session, "setting write timeout"); if(cryptStatusError((err=cryptFlushData(sbbs->ssh_session)))) { GCESSTR(err, node, LOG_WARNING, sbbs->ssh_session, "flushing data"); -- GitLab