* Starts trying to reconnect if reconnection is enabled and we have not * started reconnecting yet * * @private
()
| 297 | * @private |
| 298 | */ |
| 299 | private maybeReconnectOnOpen() { |
| 300 | // Only try to reconnect if it's the first time we're connecting |
| 301 | if ( |
| 302 | !this._reconnecting && |
| 303 | this._reconnection && |
| 304 | this.backoff.attempts === 0 |
| 305 | ) { |
| 306 | // keeps reconnection from firing twice for the same reconnection loop |
| 307 | this.reconnect(); |
| 308 | } |
| 309 | } |
| 310 | |
| 311 | /** |
| 312 | * Sets the current transport `socket`. |