code: function _attachRoomsSocketIO() {
          if (!io) return;
  
          // middleware
          io.use((socket, next) => {
              const {
                  node_id: nodeId,
              } = socket.handshake.query;
  
              if (nodeId) {
                  logger.info(`node ${nodeId} joining room on connect`);
                  socket.join(nodeId);
              }
  
              return next();
          });
      }
docs: join rooms before on connect to avoid race conditions