Skip to content

Commit

Permalink
Less sensitive internet checker
Browse files Browse the repository at this point in the history
  • Loading branch information
shortcutme committed Apr 9, 2016
1 parent e94fdda commit 1beb4fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Connection/ConnectionServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ def checkConnections(self):
connection.bad_actions = 0

# Internet outage detection
if time.time() - last_message_time > max(60, 60*5/max(1,len(self.connections)/50)):
# Offline: Last message more than 60-300sec depending on connection number
if time.time() - last_message_time > max(60, 60*10/max(1,float(len(self.connections))/50)):
# Offline: Last message more than 60-600sec depending on connection number
if self.has_internet:
self.has_internet = False
self.onInternetOffline()
Expand Down

0 comments on commit 1beb4fc

Please sign in to comment.