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

When searching for unused nodes, skip nodes that have sockets in-use

We already know such nodes are in-use, so no need to read their node.dab
record and put extra contention on the node.dab file. Hoepfully this
reduces or eliminates occurrences of the error:
    Node n status is WFC, but the node socket (s) and thread are still in use!
Though I kind of expect occurrences of "NODE STATUS FIXUP" errors to likely
return.

We could in theory just track status of nodes in memory (for those
nodes that this instance of sbbs controls), and not read the node.dab file at
all when checking those nodes' status, but:
- that would prevent out of process control of node status
  e.g. using the node utility to mark a node as offline
- we'd have to protect instance of in-memory node status checking/changing
  with a mutex
parent e0931d6d
No related branches found
No related tags found
No related merge requests found
......@@ -5711,6 +5711,8 @@ NO_SSH:
client_on(client_socket,&client,false /* update */);
for(node_num=first_node; node_num <= last_node; node_num++) {
if(node_socket[node_num - 1] != INVALID_SOCKET)
continue;
/* paranoia: make sure node.status!=NODE_WFC by default */
node.status=NODE_INVALID_STATUS;
if(!sbbs->getnodedat(node_num,&node, true))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment