Jump to content

TCP reconnect time is doubled exponentialy


shoni76

Recommended Posts

I am working in an environment that disconnect for few seconds every minute or so.

There is a sender and a receiver (Client and server).

The disconnection time might be even 20 seconds.

The problem is that the sender receive a 10054 error (connection reset by peer) after a while and then a reconnect is needed.

Therefore, I use a code that changes the 'send timeout' to 2 seconds both in the receiver and the sender.

After the timeout occurs (both in the server and the client), the receiver (server) accepts connection again and the sender tries to connect again.

The receiver tries to connect while the network is down.

When the network connects again, The receiver succeeds but not immediatly. This is because of retransmit time (Which is the reconnect time) that grows exponentialy.

The first connect fails immediatly and the second after twice that time etc.. by the time the connection is back, the retransmit is very big. therefore the connect takes very long. But i need it as soon as posible.

Does any one know how to eliminate the exponential grow?

Thanks

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...