Node-SMB / marsaud-smb2

SMB2 Client
53 stars 46 forks source link

init connection metadata on reconnection #42

Closed vdiez closed 5 years ago

vdiez commented 5 years ago

When timeout occurs, new reconnections are not possible (socket is always automatically closed) due to messageid not starting at 0. When socket reconnects, it should be as a new connection from the SMB server perspective.

julien-f commented 5 years ago

Hi,

Thanks for your contribution!

I understand the change for messageId, but why for SessionId and ProcessId?

vdiez commented 5 years ago

Hello,

indeed not a must, I just thought that logically makes more sense to treat a reconnection as a totally new connection. I can undo if needed.

Cheers

julien-f commented 5 years ago

IMHO it would make sense to generate a new SessionId but to keep the same ProcessId, what do you think?

vdiez commented 5 years ago

This is really more a "political" view, and I ignore what is the most common approach among other smb clients, so your call. I will modify as you prefer.

julien-f commented 5 years ago

Let's keep the ProcessId then, we'll change it later if it appears I was wrong :wink:

vdiez commented 5 years ago

done :)

julien-f commented 5 years ago

Thanks!

julien-f commented 5 years ago

Published as 0.14.0

vdiez commented 5 years ago

excellent, thanks to you!