Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Connection reset not detectable #36

Open
bkamenov opened this issue Sep 24, 2020 · 0 comments
Open

Connection reset not detectable #36

bkamenov opened this issue Sep 24, 2020 · 0 comments

Comments

@bkamenov
Copy link

bkamenov commented Sep 24, 2020

I have a server on my Android phone using chrome.sockets.tcpServer API. When remote peer successfully connects, the communication is fine. However, when remote peer gets disconnected in a non clean way (no power, wi-fi lost) I cannot get any information that client socket has been reset. chrome.sockets.tcp.getInfo(clientSocket) says socket is still connected. chrome.sockets.tcp.send(clientSocket, data) returns resultCode=0. chrome.sockets.tcp.onReceiveError is not fired, except when I disable the personal hotspot as I use the program as a wifi server waiting for clients to connect. Sometimes, after a long time > 120 secs chrome.sockets.tcp.onReceiveError is called saying that clientSocket has been reset. I'm running Android 10.
Absolutely identical is the behavior on iOS - if the client loses power (unclean disconnect) I do not get any callback in the server code.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant