Skip to content
Snippets Groups Projects
Commit 0a397616 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Unconditionally call sftp_end() when input thread exits.

Hopefully fixes issue where certificate file is left open and so
can't be deleted.
parent d8a0991c
Branches
Tags
1 merge request!455Update branch with changes from master
Pipeline #6306 passed
...@@ -2338,6 +2338,7 @@ void input_thread(void *arg) ...@@ -2338,6 +2338,7 @@ void input_thread(void *arg)
// if(wr>100) // if(wr>100)
// mswait(500); // Throttle sender // mswait(500); // Throttle sender
} }
sbbs->sftp_end();
sbbs->online=false; sbbs->online=false;
sbbs->sys_status|=SS_ABORT; /* as though Ctrl-C were hit */ sbbs->sys_status|=SS_ABORT; /* as though Ctrl-C were hit */
SetEvent(sbbs->inbuf.data_event); // terminate incom() wait SetEvent(sbbs->inbuf.data_event); // terminate incom() wait
......
...@@ -2164,7 +2164,8 @@ sbbs_t::init_sftp(int cid) ...@@ -2164,7 +2164,8 @@ sbbs_t::init_sftp(int cid)
bool bool
sbbs_t::sftp_end(void) sbbs_t::sftp_end(void)
{ {
sftps_end(sftp_state); if (sftp_state)
sftps_end(sftp_state);
sftp_state = nullptr; sftp_state = nullptr;
return true; return true;
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment