(e: Event)
| 144 | } |
| 145 | |
| 146 | onopen(e: Event) { |
| 147 | dlog("connection open"); |
| 148 | this.open = true; |
| 149 | this.opening = false; |
| 150 | this.onOpenTimeoutId = setTimeout(() => { |
| 151 | this.reconnectTimes = 0; |
| 152 | dlog("clear reconnect times"); |
| 153 | }, StableConnTime); |
| 154 | for (let handler of reconnectHandlers) { |
| 155 | handler(); |
| 156 | } |
| 157 | this.runMsgQueue(); |
| 158 | } |
| 159 | |
| 160 | runMsgQueue() { |
| 161 | if (!this.open) { |