void resync()

Source

void resync() {
  for (var i = 0; i < sockets.length; i++) {
    _workCounts[i] = 0;
    sockets[i]._pool = this;
    sockets[i].onReceivedMessageHandler = (msg) {
      if (onMessageReceivedHandler != null) {
        onMessageReceivedHandler(i, msg);
      }
    };
  }
}