Skip to content
Snippets Groups Projects
Commit a474017f authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

sbbs_t::incom() should return NOINP immediately if/when socket disconnected

JS console.inkey() and friends use this as the underlying function to get
input from the TCP socket.

This might address issue #725

Hoping Nelgin will let us know.
parent e7738fa4
No related branches found
No related tags found
No related merge requests found
Pipeline #5982 passed
......@@ -2244,6 +2244,7 @@ void input_thread(void *arg)
}
sbbs->online=false;
sbbs->sys_status|=SS_ABORT; /* as though Ctrl-C were hit */
SetEvent(sbbs->inbuf.data_event); // terminate incom() wait
sbbs->input_thread_running = false;
sbbs->terminate_output_thread = true;
......@@ -3961,6 +3962,9 @@ int sbbs_t::incom(unsigned int timeout)
{
uchar ch;
if(!online)
return NOINP;
// If we think we may have some input, send all our output
if (RingBufFull(&outbuf) != 0) {
SetEvent(outbuf.highwater_event);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment