DAPNETGateway icon indicating copy to clipboard operation
DAPNETGateway copied to clipboard

Service stops working when internet connection changes

Open dk5ras opened this issue 6 years ago • 5 comments

Hi,

It appears that the service stops working when the internet connection is unstable or changes its IP address. MMDVMHost still works, DV operation is not affected, but DAPNET connection breaks. Restarting the dapnetgateway service fixes this.

Ralph, dk5ras.

dk5ras avatar Aug 09 '18 05:08 dk5ras

I've put a log output into line 72 of DAPNETNetwork.cpp to see the error code while reading from a broken socket (router rebooted), but there is no negative error code from m_socket.read() at all when the server has been disconnected. So the recover() mechanism in DAPNETGateway.cpp is never executed, the Gateway just stops working.

dd5xl avatar Aug 19 '18 07:08 dd5xl

As an update, the general stability appears better now, but still when the network changes (for example new IP address on the WAN side) the connection dies.

dk5ras avatar Aug 28 '18 07:08 dk5ras

This problem occurs also when core was restartet. The Gateway seems to work and does not notice broken connection to core and will not reconnect.

In Dapnet Core there is a Ping-Pong-Command to check connection - is this not implemented in Gateway?

do6uk avatar Sep 02 '18 10:09 do6uk

I'm not firm in cpp - is it possible to set an timeout in socket-read and send an ping-command to core. If failed - restart conn else go again to read from socket.

do6uk avatar Sep 02 '18 10:09 do6uk

I've added keepalives to the TCP connection to DAPNET. I hope that makes things better.

g4klx avatar Sep 10 '18 12:09 g4klx