Allow more time for connect than for normal reads.

This commit is contained in:
Jeremy Fincher 2003-11-25 10:34:07 +00:00
parent 77393f83ad
commit e65dcaab86

View File

@ -121,11 +121,12 @@ class SocketDriver(drivers.IrcDriver):
def reconnect(self): def reconnect(self):
#debug.methodNamePrintf(self, 'reconnect') #debug.methodNamePrintf(self, 'reconnect')
self.conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.conn = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.conn.settimeout(conf.poll) self.conn.settimeout(conf.poll*10) # Allow more time for connect.
if self.reconnectWaitsIndex < len(self.reconnectWaits)-1: if self.reconnectWaitsIndex < len(self.reconnectWaits)-1:
self.reconnectWaitsIndex += 1 self.reconnectWaitsIndex += 1
try: try:
self.conn.connect(self.server) self.conn.connect(self.server)
self.conn.settimeout(conf.poll)
except socket.error, e: except socket.error, e:
if e.args[0] != 115: if e.args[0] != 115:
debug.msg('Error connecting to %s: %s' % (self.server, e)) debug.msg('Error connecting to %s: %s' % (self.server, e))