Skip to content

Conversation

@osvegn
Copy link
Contributor

@osvegn osvegn commented Oct 23, 2025

I've some issue about closed socket on receive packet. I don't really understand why, but the SendPacket method successfully send the packet, but the ReceivePacketFillSockBuffer method has a closed connection.
In my case, I tried by restarting a samba active directory while a socket is open.
So I started to think about trying to reconnect the socket, but the question is "What packet should I receive from my request if it has been closed then reconnect?" I assume nothing cause the context has been lost.
In my opinion, I should restart the request from the beginning, but I'm not sure about how to do it.
I started to do something, but I don't know yet how to finish...

@synopse
Copy link
Owner

synopse commented Oct 24, 2025

Please give some more feedback about the context.
For instance, is it on a somewhat idle connection? SendPacket() could succeed at socket level, but fail on the server side because it is disconnected for some reason (keep alive timeout) on the server...
Some logs may help.
AFAICT if we recreate the connection, we need to restart the request from scratch, so your fix won't be enough.
This auto-reconnection should already be taken into account, IIRC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants