Skip to content

Commit

Permalink
ray: [web-src] reconnecting ws owntone#1446
Browse files Browse the repository at this point in the history
  • Loading branch information
whatdoineed2do/Ray committed Dec 30, 2023
1 parent 390bfaa commit 4ed51b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion web-src.v3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"luxon": "^3.4.4",
"mdi-vue": "^3.0.13",
"mdi-vue3": "^7.2.96",
"reconnectingwebsocket": "^1.0.0",
"reconnecting-websocket": "^4.4.0",
"spotify-web-api-js": "^1.5.2",
"string-to-color": "^2.2.2",
"vue": "^3.3.8",
Expand Down
8 changes: 5 additions & 3 deletions web-src.v3/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import ModalDialogRemotePairing from '@/components/ModalDialogRemotePairing.vue'
import ModalDialogUpdate from '@/components/ModalDialogUpdate.vue'
import webapi from '@/webapi'
import * as types from '@/store/mutation_types'
import ReconnectingWebSocket from 'reconnectingwebsocket'
import ReconnectingWebSocket from 'reconnecting-websocket'
export default {
name: 'App',
Expand Down Expand Up @@ -178,8 +178,8 @@ export default {
}
const socket = new ReconnectingWebSocket(wsUrl, 'notify', {
reconnectInterval: 1000,
maxReconnectInterval: 2000
minReconnectionDelay: 1000,
maxReconnectionDelay: 2000
})
socket.onopen = function () {
Expand Down Expand Up @@ -244,6 +244,8 @@ export default {
return
}
socket.reconnect()
vm.update_outputs()
vm.update_player_status()
vm.update_library_stats()
Expand Down

0 comments on commit 4ed51b9

Please sign in to comment.