File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -22,15 +22,15 @@ function init_websocket(attempts=1) {
2222 websocket_connection . close ( ) ;
2323 websocket_connection = null ;
2424 }
25- if ( attempts >= 2 ) {
26- const el = document . querySelector ( 'body' ) ;
27- const alert = document . createElement ( 'div' ) ;
28- alert . classList . add ( 'alert' , 'alert-danger' , 'text-center' , 'm-3' ) ;
29- alert . textContent = 'Услугата е временно недостъпна. Моля опитайте по-късно.' ;
30- el . innerHTML = '' ;
31- el . appendChild ( alert ) ;
32- return ;
33- }
25+ // if(attempts >= 2) {
26+ // const el = document.querySelector('body');
27+ // const alert = document.createElement('div');
28+ // alert.classList.add('alert', 'alert-danger', 'text-center', 'm-3');
29+ // alert.textContent = 'Услугата е временно недостъпна. Моля опитайте по-късно.';
30+ // el.innerHTML = '';
31+ // el.appendChild(alert);
32+ // return;
33+ // }
3434 websocket_connection = new WebSocket ( WEBSOCKET_URL ) ;
3535 websocket_connection . onmessage = ev => {
3636 let data = JSON . parse ( ev . data ) ;
@@ -61,7 +61,7 @@ function init_websocket(attempts=1) {
6161 apply_filters ( ) ;
6262 } ;
6363 websocket_connection . onerror = ( ) => {
64- setTimeout ( ( ) => init_websocket ( attempts + 1 ) , 1000 ) ;
64+ setTimeout ( ( ) => init_websocket ( attempts + 1 ) , 2500 ) ;
6565 }
6666}
6767
You can’t perform that action at this time.
0 commit comments