Merge pull request #246 from dw/issue179

issue #179: ec0_receive() and connect_bootstrap() should use deadline.
pull/248/head
dw 7 years ago committed by GitHub
commit 3ff37113e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1,7 @@
sudo: required
addons:
apt:
update: true
notifications:
email: false

@ -756,11 +756,10 @@ class Stream(mitogen.core.Stream):
def _ec0_received(self):
LOG.debug('%r._ec0_received()', self)
write_all(self.transmit_side.fd, self.get_preamble())
discard_until(self.receive_side.fd, 'EC1\n', time.time() + 10.0)
discard_until(self.receive_side.fd, 'EC1\n', self.connect_deadline)
def _connect_bootstrap(self, extra_fd):
deadline = time.time() + self.connect_timeout
discard_until(self.receive_side.fd, 'EC0\n', deadline)
discard_until(self.receive_side.fd, 'EC0\n', self.connect_deadline)
self._ec0_received()

Loading…
Cancel
Save