Skip to content
Snippets Groups Projects
Commit 801631e5 authored by rswindell's avatar rswindell
Browse files

Re-enable socket optoins and blocking configuration for the client_socket_dup

when de-activating the passthru_socket.
parent 5309058a
Branches
Tags
No related merge requests found
...@@ -2111,6 +2111,15 @@ void sbbs_t::passthru_socket_activate(bool activate) ...@@ -2111,6 +2111,15 @@ void sbbs_t::passthru_socket_activate(bool activate)
break; break;
} }
} else { } else {
/* Re-enable blocking (in case disabled by external program) */
ulong l=0;
ioctlsocket(client_socket_dup, FIONBIO, &l);
/* Re-set socket options */
char err[512];
if(set_socket_options(&cfg, client_socket_dup, "passthru", err, sizeof(err)))
lprintf(LOG_ERR,"%04d !ERROR %s setting passthru socket options", client_socket, err);
do { // Allow time for the passthru_thread to move any pending socket data to the outbuf do { // Allow time for the passthru_thread to move any pending socket data to the outbuf
SLEEP(100); // Before the node_thread starts sending its own data to the outbuf SLEEP(100); // Before the node_thread starts sending its own data to the outbuf
} while(RingBufFull(&sbbs->outbuf)); } while(RingBufFull(&sbbs->outbuf));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment