| 8521 | } else if (!dispatcher.dispatch(opts, handler)) { |
| 8522 | dispatcher[kNeedDrain] = true; |
| 8523 | this[kNeedDrain] = !this[kGetDispatcher](); |
| 8524 | } |
| 8525 | return !this[kNeedDrain]; |
| 8526 | } |
| 8527 | [kAddClient](client) { |
| 8528 | client.on("drain", this[kOnDrain]).on("connect", this[kOnConnect]).on("disconnect", this[kOnDisconnect]).on("connectionError", this[kOnConnectionError]); |
| 8529 | this[kClients].push(client); |
| 8530 | if (this[kNeedDrain]) { |
| 8531 | queueMicrotask(() => { |
| 8532 | if (this[kNeedDrain]) { |
| 8533 | this[kOnDrain](client[kUrl], [this, client]); |
| 8534 | } |