- if your time is off by more than an hour, you won't be able to
establish a connection to the network. This patch adds a UI
notification so that the user can understand why he can't connect.
shared.UISignalQueue.put(('updateStatusBar',tr._translate("MainWindow","The time on your computer, %1, may be wrong. Please verify your settings.").arg(datetime.datetime.now().strftime("%H:%M:%S"))))
defprocessData(self):
iflen(self.data)<shared.Header.size:# if so little of the data has arrived that we can't even read the checksum then wait for more data.
return
@ -265,6 +276,7 @@ class receiveDataThread(threading.Thread):
# there is no reason to run this function a second time
@ -699,15 +711,21 @@ class receiveDataThread(threading.Thread):
iftimeOffset>3600:
self.sendDataThreadQueue.put((0,'sendRawData',shared.assembleErrorMessage(fatal=2,errorText="Your time is too far in the future compared to mine. Closing connection.")))
logger.info("%s's time is too far in the future (%s seconds). Closing connection to it."%(self.peer,timeOffset))
self.sendDataThreadQueue.put((0,'sendRawData',shared.assembleErrorMessage(fatal=2,errorText="Your time is too far in the past compared to mine. Closing connection.")))
logger.info("%s's time is too far in the past (timeOffset %s seconds). Closing connection to it."%(self.peer,timeOffset))