Menu

#1 receive_until_match always waits until timeout

open
nobody
None
5
2004-02-09
2004-02-09
No

Transport.receive_until_match() always waits until the
timeout has expired before it returns - even if the
string read has matched the argument.

The routine should call read() instead of
receive_available() (line 69). ie

# we might be overreading now but reading
and searching
# byte-by-byte is way to slow (in Python -
in C# it is
# plenty fast enough)
s.fromstring(self.receive_available(time_left))

becomes

# we might be overreading now but reading
and searching
# byte-by-byte is way to slow (in Python -
in C# it is
# plenty fast enough)
s.fromstring(self.read(1, time_left))

Discussion


Log in to post a comment.