mirror of
https://github.com/janishutz/MusicPlayerV2.git
synced 2025-11-25 21:14:22 +00:00
fix reconnection spamming
This commit is contained in:
@@ -154,12 +154,20 @@ createApp( {
|
||||
setTimeout( () => {
|
||||
if ( !self.isReconnecting ) {
|
||||
self.isReconnecting = true;
|
||||
self.connect();
|
||||
self.isReconnecting = false;
|
||||
self.tryReconnect();
|
||||
}
|
||||
}, 1000 );
|
||||
}, false );
|
||||
},
|
||||
tryReconnect() {
|
||||
const int = setInterval( () => {
|
||||
if ( !this.isReconnecting ) {
|
||||
clearInterval( int );
|
||||
} else {
|
||||
connectToSSESource();
|
||||
}
|
||||
}, 1000 );
|
||||
},
|
||||
handleBackground() {
|
||||
let colourDetails = [];
|
||||
let colours = [];
|
||||
|
||||
Reference in New Issue
Block a user