Showing
1 changed file
with
4 additions
and
0 deletions
... | ... | @@ -41,6 +41,10 @@ const getSocketInstance = (request: ExtraRequestConfigType) => { |
41 | 41 | const socketUrl = `${getOriginUrl(requestOriginUrl || '')}${requestUrl}?token=${token}` |
42 | 42 | |
43 | 43 | const instance = useWebSocket(socketUrl, { |
44 | + autoReconnect: { | |
45 | + retries: 20, | |
46 | + delay: 1000 * 30 | |
47 | + }, | |
44 | 48 | onMessage() { |
45 | 49 | const { data: originData } = instance |
46 | 50 | const value = parse(unref(originData)) as SocketReceiveMessageType | ... | ... |