Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/smbprotocol/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ def disconnect(self, close=True, timeout=None):

log.info("Disconnecting transport connection")
self.transport.close()
if self._t_worker:
if self._t_worker and self._t_worker.ident != threading.get_ident():
self._t_worker.join(timeout=2)

def send(
Expand Down
2 changes: 1 addition & 1 deletion src/smbprotocol/transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def _recv(self, length, timeout):
except OSError as e:
# Windows will raise this error if the socket has been shutdown, Linux return returns an empty byte
# string so we just replicate that.
if e.errno not in [errno.ESHUTDOWN, errno.ECONNRESET]:
if e.errno not in [errno.ESHUTDOWN, errno.ECONNRESET, errno.ECONNABORTED]:
# Avoid collecting coverage here to avoid CI failing due to race condition differences
raise # pragma: no cover
b_data = b""
Expand Down