rdavisau/sockets-for-pcl

Connection closed by remote host not recognized on Android

Opened this issue · 0 comments

Until now i only had Samsung devices to reproduce.
The devices use an energy saving mode and my app has an active connection to a remote host.
When i put the app into Sleep, by locking the device, i send a signal to the remote host in the App.OnSleep handler, which is called ~120secs after locking the device.
The remote host tries to send a confirmation, which fails and closes the remote socket. I guess thats the behavior, when the app is in sleep mode.
But when i resume the application, the socket still is in connected state and writing the stream still does seem to work. Although the connection is closed by the remote host. I dont get any error, exception or state change. although the connection is dead.