jborean93 / smbprotocol

Python SMBv2 and v3 Client
MIT License
320 stars 73 forks source link

`reset_connection_cache` not deleting on disconnection failure. #248

Open NarinderS opened 10 months ago

NarinderS commented 10 months ago

The reset_connection_cache function doesn't seem to delete a connection if it fails to disconnect first. So for example, if the connection had the wrong credentials, it sits around in the cache forever, unless deleted via delete_session.

The simplest solution would be to delete the connection, no matter if disconnection was successful, but I'm not sure if that would cause other issues.

jborean93 commented 10 months ago

Thanks for the report, I'll try and fix it up when I get to looking at the current log of issues soon.