-
August 3rd, 2010, 08:48 AM
#1
TCP keepalives sent too early and terminates connection
I'm trying to implement an persistent TCP connection between an Android phone and a desktop server.
I've got heartbeat threads on both ends which are sending keepalive-packets on application level successfully.
The problem is that after a while (varies between 5-20min) the phone is starting to send TCP keepalives to the server, which the server does not seem to respond to. (I'm using Wireshark to monitor this).
This results in an exception on the server thread which is reading from the phone:java.net.SocketException: Connection reset
Why are the phone sending TCP keepalives so early? Even when there's constantly activity on application level? And why doesn't the desktop server respond to this keepalives?
I've checked my Android phone's settings with "sysctl -A | grep net.ipv4" and "net.ipv4.tcp_keepalive_time" is set to 7200 (2 hours).
Thanks.
-
August 3rd, 2010, 08:50 AM
#2
Re: TCP keepalives sent too early and terminates connection
Sorry, I placed this thread very wrong. If a mod can be kind and move it to Java programming or anything? Thanks.
-
August 12th, 2010, 02:28 AM
#3
Re: TCP keepalives sent too early and terminates connection
hi,
I'm trying to implement an persistent TCP connection between an Android phone and a desktop server.
Why are the phone sending TCP keepalives so early? Even when there's constantly activity on application level? And why doesn't the desktop server respond to this keepalives
regards,
phe9oxis,
http://www.guidebuddha.com
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|