[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#3190: rlogin takes far too long when remote says Connection Refused

You (Mark Eichin) wrote:
> Ian Jackson <ian@chiark.chu.cam.ac.uk> writes:
> > Using strace I can see that it appears to be retrying the call !
> Hmm. From what I remember of the original BSD source, yes, it spins
> (around a sleep, I think) trying to reconnect on a connection refused,
> until an alarm goes off. There's probably some arcane bit of history
> behind it... but it should probably just go away :-)

No, it is needed. Sometimes our login machine still thinks it has a socket
open to the terminal server, while there isn't a socket open on the
terminal server. Thus it can happen that the terminal server tries to
connect from a source port of which the login machine thinks it is already
in use. Result is ECONNREFUSED, and the code in the BSD source just
does a sleep and retries on another port number.

In fact that isn't really true; it doesn't work under Linux. I do have
a fix though.

  Miquel van    | Cistron Internet Services   --    Alphen aan den Rijn.
  Smoorenburg,  | mailto:info@cistron.nl          http://www.cistron.nl/
miquels@het.net | Tel: +31-172-419445 (Voice) 430979 (Fax) 442580 (Data)

Reply to: