- This topic has 5 replies, 2 voices, and was last updated 2 years, 11 months ago by .
Viewing 4 reply threads
Viewing 4 reply threads
- You must be logged in to reply to this topic.
Hello,
I getting more often disconnections (ondisconnect event will occur) with a 4G connection and native transport.
Any ideas how to avoid this ?
Thank you
Changing SetKeepAlive to 20 instead of 5 seems to resolve the problem … Keep testing …
function TkbmMWAbstractSocket.SetKeepAlive(ASocket:THandle):Integer;
begin
//Result:=TkbmMWSocketAPI.SetKeepAlive(ASocket,5,3,5);
Result:=TkbmMWSocketAPI.SetKeepAlive(ASocket,20,3,5);
end;
btw, It would be nice to have it on a property or something to be able to set socket options.
Nope, changing keepalive values didn’t help!
The issue exists with wifi connections too. Random few (2-4) disconnection per day.
Anything that i can debug ?
Thank you
Hi,
My guess is that Indy do not detect disconnection until the time when you try to send something due to it being a blocking non async transport, while the native transports are pure async transports, and any changes from the stack will be signalled back as soon as possible.
/Kim
I found the issue. It’s VerifyTransfer. When it’s enabled it throws randomly an Invalid Data error and Disconnects.
I disable atm and no more random disconnections.