Skip to content

Commit

Permalink
fix(useWebsocket): pongTimeout auto-reconnect no work (#3321)
Browse files Browse the repository at this point in the history
Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com>
  • Loading branch information
shanyi-front and antfu committed Aug 25, 2023
1 parent 8b5ed4d commit 9337253
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/useWebSocket/index.ts
Expand Up @@ -275,6 +275,7 @@ export function useWebSocket<Data = any>(
pongTimeoutWait = setTimeout(() => {
// auto-reconnect will be trigger with ws.onclose()
close()
explicitlyClosed = false
}, pongTimeout)
},
interval,
Expand Down

0 comments on commit 9337253

Please sign in to comment.