diff --git a/src/sbbs3/main.cpp b/src/sbbs3/main.cpp index c0edd68a8edda0cd6d85a6cd04e694b5792aabb3..5f10745444dc5c1be2761af5d5fcca2a6f23f4f1 100644 --- a/src/sbbs3/main.cpp +++ b/src/sbbs3/main.cpp @@ -2458,23 +2458,14 @@ void output_thread(void* arg) */ if(cryptStatusError(err=cryptSetAttribute(sbbs->ssh_session, CRYPT_OPTION_NET_WRITETIMEOUT, 5))) GCESSTR(err, node, LOG_WARNING, sbbs->ssh_session, "setting write timeout"); - do { - if(cryptStatusError((err=cryptFlushData(sbbs->ssh_session)))) { - GCESSTR(err, node, LOG_WARNING, sbbs->ssh_session, "flushing data"); - ssh_errors++; - if (err == CRYPT_ERROR_TIMEOUT) { - (void)cryptPopData(sbbs->ssh_session, (void *)"", 0, &err); - if (cryptStatusError(err)) - GCESSTR(err, node, LOG_WARNING, sbbs->ssh_session, "popping SSH data after timeout"); - else - err = CRYPT_ERROR_TIMEOUT; - } - else { - sbbs->online=FALSE; - i=buftop-bufbot; // Pretend we sent it all - } + if(cryptStatusError((err=cryptFlushData(sbbs->ssh_session)))) { + GCESSTR(err, node, LOG_WARNING, sbbs->ssh_session, "flushing data"); + ssh_errors++; + if (err != CRYPT_ERROR_TIMEOUT) { + sbbs->online=FALSE; + i=buftop-bufbot; // Pretend we sent it all } - } while (err == CRYPT_ERROR_TIMEOUT); + } // READ = WRITE TIMEOUT HACK... REMOVE WHEN FIXED if(cryptStatusError(err=cryptSetAttribute(sbbs->ssh_session, CRYPT_OPTION_NET_WRITETIMEOUT, 0))) GCESSTR(err, node, LOG_WARNING, sbbs->ssh_session, "setting write timeout");