[muscle] Re: timing out a connection attempt

  • From: "Mika Lindqvist" <linki@xxxxxxx>
  • To: <muscle@xxxxxxxxxxxxx>
  • Date: Wed, 15 Oct 2003 17:28:33 +0300

I use timers to check for timeouts... Sometimes I get situations where I =
get
no OutputQueuesDrained Message at all... I think there should be a =
timeout
also, or maybe something weird is happening there ;) In Unizone I have 1
minute timers divided to 4 shorter iterations (15 secs each). First send =
2
nop packets and if I won't get anything back, I will wait for 30 more
seconds (2 small iterations) and then nuke the connection if nothing =
still
happens. Usually with this I never get "zombie" threads and every =
leecher is
happy ;). I use 15 sec checks to not postpone OutputQueuesDrained =
message
too far because the queue doesn't ever drain if one adds new messages to =
be
sent just before it drains.

- Monni -

> -----Original Message-----
> From: muscle-bounce@xxxxxxxxxxxxx=20
> [mailto:muscle-bounce@xxxxxxxxxxxxx] On Behalf Of David Svanberg
> Sent: Wednesday, October 15, 2003 5:06 PM
> To: muscle mailing list
> Subject: [muscle] timing out a connection attempt
>=20
>=20
> Hi.
>=20
> How should I handle connection timeouts?
>=20
> When I use the MessageTransceiverThread's=20
> AddNewConnectSession method in my client it hangs when it=20
> can't connect to the server.
>=20
> There would be nice to have a timeout possibility in the=20
> AddNewConnectSession method call, i.e. the last argument is a=20
> "number of milliseconds before this connection attempt is=20
> considered timed out". What do you guys think? Or is there=20
> another way to achieve the same effect?
>=20
> Best Regards,
> David Svanberg
> Software Engineer  Poseidon Simulation AS
> Naeringsparken, P.O.Box 89, N-8376 Leknes, Norway
> Tel:+47 760 54 330  Fax:+47 760 82 006
> E-mail:ds@xxxxxxxxxxx  www.poseidon.no
>=20
> POSEIDON - your maritime training partner
>=20
>=20
>=20



Other related posts: