Set max websocket reconnect retries in development

This commit is contained in:
Kasper Seweryn 2022-05-03 03:04:09 +02:00 committed by Georg Krause
parent a872f752c5
commit b5970446b4
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ export const install: InitModule = ({ store }) => {
.replace(/^http/, 'ws')
const { data, status, open, close } = useWebSocket(url, {
autoReconnect: true,
autoReconnect: import.meta.env.DEV ? { retries: 3 } : true,
immediate: false
})