Date: Wed, 27 Sep 2000 10:36:58 +0200 From: Erik Trulsson <ertr1013@student.uu.se> To: Bjorn Tornqvist <bjorn@tornqvist.net> Cc: freebsd-questions@freebsd.org Subject: Re: bind(2) gives EADDRINUSE during 60 seconds. Why? Message-ID: <20000927103658.A1056@student.uu.se> In-Reply-To: <Pine.BSF.4.21.0009270957180.64865-100000@tornqvist.net>; from bjorn@tornqvist.net on Wed, Sep 27, 2000 at 09:58:13AM %2B0200 References: <Pine.BSF.4.21.0009270957180.64865-100000@tornqvist.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Sep 27, 2000 at 09:58:13AM +0200, Bjorn Tornqvist wrote: > > Howdy! > > I hope someone can explain this behaviour to me; The kernel seems to > make a stream port "un-rebindable" within 60 seconds after another > stream-server-process has had the port bound. > The easiest way to illustrate (with port/sysutils/socket): > Terminal one: Terminal two: > socket -s 19191 > telnet localhost 19191 > ^C > Connection closed by foreign host > socket -s 19191 > socket: server socket: Address already in use > > [wait 60 seconds] > ...and socket -s 19191 will succeed again. > > What is causing this? This behaviour causes my application to fail a > critical requirement and there must surely be something wrong with my > (aswell as socket(1)'s) interaction with the tcp/ip stack? > This is actually correct behaviour for tcp/ip. It has to do with the tcp/ip stack having to timeout when a connection is closed in case some packet got lost/delayed when closing the connection. For details read some good book about TCP/IP. (Or the relevant RFCs) -- <Insert your favourite quote here.> Erik Trulsson ertr1013@student.uu.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000927103658.A1056>