summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.txt6
-rw-r--r--serial/rfc2217.py2
2 files changed, 7 insertions, 1 deletions
diff --git a/CHANGES.txt b/CHANGES.txt
index 6c2d478..da3f6df 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -476,3 +476,9 @@ Bugfixes (win32):
- [Bug pyserial:152] Cannot configure port, some setting was wrong. Can leave
port handle open but port not accessible
+Version 2.8 2014-xx-xx
+---------------------------
+
+Bugfixes:
+
+- [Bug pyserial:166] RFC2217 connections always fail
diff --git a/serial/rfc2217.py b/serial/rfc2217.py
index 2012ea7..3781ac6 100644
--- a/serial/rfc2217.py
+++ b/serial/rfc2217.py
@@ -442,7 +442,7 @@ class RFC2217Serial(SerialBase):
timeout_time = time.time() + self._network_timeout
while time.time() < timeout_time:
time.sleep(0.05) # prevent 100% CPU load
- if sum(o.active for o in mandadory_options) == len(mandadory_options):
+ if sum(o.active for o in mandadory_options) == sum(o.state != INACTIVE for o in mandadory_options):
break
else:
raise SerialException("Remote does not seem to support RFC2217 or BINARY mode %r" % mandadory_options)