commit 31b471d9c43980c7e8d44df86a5eec9791d23b48
Author: David Fifield <david(a)bamsoftware.com>
Date: Thu Apr 26 09:57:35 2012 -0700
Catch socket errors when doing the first sends of buffered data.
---
connector.py | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/connector.py b/connector.py
index d101a30..3e2bfd9 100755
--- a/connector.py
+++ b/connector.py
@@ -711,9 +711,16 @@ def match_proxies():
remote.partner = local
local.partner = remote
if remote.buf:
- proxy_chunk_remote_to_local(remote, local, remote.buf)
+ if not proxy_chunk_remote_to_local(remote, local, remote.buf):
+ remotes.remove(remote)
+ locals.remove(local)
+ register()
+ return
if local.buf:
- proxy_chunk_local_to_remote(local, remote, local.buf)
+ if not proxy_chunk_local_to_remote(local, remote, local.buf):
+ remotes.remove(remote)
+ locals.remove(local)
+ return
class TimeoutSocket(object):
def __init__(self, fd):