Skip to content

Commit

Permalink
Merge pull request erictik#86 from erictik/new-ws
Browse files Browse the repository at this point in the history
  • Loading branch information
zcpua authored Jun 4, 2023
2 parents a3883c6 + 0ca4c09 commit e6cbdfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ws.message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ export class WsMessage {
this.ws.addEventListener("message", (event) => {
this.parseMessage(event.data as string);
});
this.ws.onclose = () => {
this.ws.addEventListener("error", (event) => {
this.reconnectTime[num] = true;
this.reconnect();
};
});
setTimeout(() => {
this.heartbeat(num);
}, 1000 * 10);
Expand Down

0 comments on commit e6cbdfa

Please sign in to comment.