(handler: () => void)
| 306 | this.stopPing(); |
| 307 | this.connected = false; |
| 308 | } |
| 309 | |
| 310 | /** |
| 311 | * Holds the socket open for this caller. The zero-to-one transition calls |
| 312 | * connect(); every subsequent call increments an internal refcount without |
| 313 | * creating a second socket. Call release() when the caller no longer needs |
| 314 | * the connection. Callers must pair every acquire with exactly one release. |
| 315 | */ |
| 316 | async acquire(): Promise<void> { |
no test coverage detected