Only fill throttle when buffer is empty

This commit is contained in:
jesopo 2019-07-22 13:14:07 +01:00
parent 92c76766f5
commit 4babce5357

View file

@ -139,7 +139,7 @@ class Socket(IRCObject.Object):
self._recent_sends.clear() self._recent_sends.clear()
throttle_space = self.throttle_space() throttle_space = self.throttle_space()
if throttle_space: if not self._buffered_lines and 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: