Commit e3874b09 authored by Julien Muchembled's avatar Julien Muchembled

Fix OverflowError on Windows

Traceback (most recent call last):
  File "/opt/re6stnet/re6stnet", line 403, in main
    tunnel_manager.handlePeerEvent()
  File "/cygdrive/d/slapos/opt/git/re6stnet/re6st/tunnel.py", line 472, in handlePeerEvent
    self.sock.sendto('\1' + ''.join(msg), address)
parent cd99197e
......@@ -434,7 +434,7 @@ class TunnelManager(object):
msg.append(encode(self._peer_db.getPeerList().next()))
if msg:
try:
self.sock.sendto('\1' + ''.join(msg), address)
self.sock.sendto('\1' + ''.join(msg), address[:2])
except socket.error, e:
logging.info('Failed to reply to %s (%s)', address, e)
elif code == 255:
......@@ -447,6 +447,6 @@ class TunnelManager(object):
for x in (self._connection_dict, self._served)
for x in x)
try:
self.sock.sendto(''.join(msg), address)
self.sock.sendto(''.join(msg), address[:2])
except socket.error, e:
pass
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment