Impossible to reconnect to smb after close SMBConnection
Anakael opened this issue · 2 comments
Anakael commented
python version: 3
steps to reproduce:
- create SMBConnection instance with
is_direct_tcp=True
- call connect on SMBConnection instance
- call close on SMBConnection instance
- call connect on SMBConnection instance
ConnectionResetError: [Errno 104] Connection reset by peer
miketeo commented
@Anakael : pysmb SMBConnection instances are not designed to be reused. Instead, they are modeled to be like file or socket objects which are used and discarded. If you need to re-establish a connection to the same SMB server after close(), you should create a new SMBConnection instance.
Anakael commented
I see.
Thank you for explanation!