Skip to content

Commit

Permalink
reconnect after 5 seconds when disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
josephdadams committed Oct 4, 2024
1 parent d01bc9b commit 98de58c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions listener_clients/relay-listener/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,11 @@ function connectToServer(ip, port) {

socket.on('disconnect', function(){
logger('Disconnected from Tally Arbiter server.', 'error');
//attempt to reconnect after 5 seconds
setTimeout(function() {
openSocket();
}, 5000);

});

socket.on('error', function(error){
Expand Down

0 comments on commit 98de58c

Please sign in to comment.