We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2364d2 commit 48602cfCopy full SHA for 48602cf
slack_sdk/socket_mode/builtin/internals.py
@@ -204,7 +204,9 @@ def receive(specific_buffer_size: Optional[int] = None):
204
logger.debug(f"Received bytes: {received_bytes}")
205
return received_bytes
206
except OSError as e:
207
- if e.errno == errno.EBADF:
+ # For Linux/macOS, errno.EBADF is the expected error for bad connections.
208
+ # The errno.ENOTSOCK can be sent when running on Windows OS.
209
+ if e.errno in (errno.EBADF, errno.ENOTSOCK):
210
logger.debug("The connection seems to be already closed.")
211
return bytes()
212
raise e
0 commit comments