We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2935c07 commit 920083bCopy full SHA for 920083b
1 file changed
logstash_async/transport.py
@@ -159,6 +159,9 @@ def _is_sock_write_buff_empty(self):
159
return True
160
161
socket_fd = self._sock.fileno()
162
+ if socket_fd == -1:
163
+ return True
164
+
165
buffer_size = struct.pack('I', 0)
166
ioctl_result = fcntl.ioctl(socket_fd, termios.TIOCOUTQ, buffer_size)
167
buffer_size = struct.unpack('I', ioctl_result)[0]
0 commit comments