Check throttle space when queueing more data not whether there's no queued data
This commit is contained in:
parent
98215f66eb
commit
e343bf3e6a
1 changed files with 2 additions and 2 deletions
|
@ -122,8 +122,8 @@ class Socket(IRCObject.Object):
|
||||||
|
|
||||||
def _send(self) -> typing.List[str]:
|
def _send(self) -> typing.List[str]:
|
||||||
decoded_sent = []
|
decoded_sent = []
|
||||||
if not len(self._write_buffer):
|
throttle_space = self.throttle_space()
|
||||||
throttle_space = self.throttle_space()
|
if throttle_space:
|
||||||
to_buffer = self._queued_lines[:throttle_space]
|
to_buffer = self._queued_lines[:throttle_space]
|
||||||
self._queued_lines = self._queued_lines[throttle_space:]
|
self._queued_lines = self._queued_lines[throttle_space:]
|
||||||
for line in to_buffer:
|
for line in to_buffer:
|
||||||
|
|
Loading…
Reference in a new issue