|
@@ -51,10 +51,10 @@ class ClientConnectionProtocol(basic_protocols.Protocol):
|
|
|
#
|
|
|
#
|
|
|
if self.state is self.states.SEND_GROUP_ID:
|
|
|
- if block:
|
|
|
+ if block and self.wait_until is not None:
|
|
|
time.sleep(self.wait_until-time.time())
|
|
|
#
|
|
|
- if time.time() >= self.wait_until and self.sub_protocol.run(block=block):
|
|
|
+ if (self.wait_until is None or time.time() >= self.wait_until) and self.sub_protocol.run(block=block):
|
|
|
self.sub_protocol = basic_protocols.PushDataProtocol(self.socket, self.total_bytes,
|
|
|
data_generator=self.data_generator,
|
|
|
send_max_bytes=1024*512)
|