Date: Wed, 17 Apr 2002 15:00:27 -0700 From: Marc Hunter <hunter@hunter.net> To: Edwin Groothuis <edwin@mavetju.org> Cc: freebsd-questions@freebsd.org Subject: Re: Killing a FIN_WAIT_2 Message-ID: <4.2.0.58.20020417144927.00c00e20@192.168.0.64> In-Reply-To: <20020418073640.N56548@k7.mavetju.org> References: <4.2.0.58.20020417121658.00954290@192.168.0.64> <4.2.0.58.20020417121658.00954290@192.168.0.64>
next in thread | previous in thread | raw e-mail | index | archive | help
At 07:36 AM 04/18/02 +1000, Edwin Groothuis wrote: >On Wed, Apr 17, 2002 at 12:18:35PM -0700, Marc Hunter wrote: > > I have a tcp connection that's sitting in FIN_WAIT_2 according to netstat > > -a, and it's locking up the port, preventing me from restarting my server > > app... I know those connections time out after some time, but is there > any > > way of explicitly killing it? (other than rebooting) > >There is no such thing. You should be able to restart the server >anyway if you set the SO_REUSEADDR on the socket: > > setsockopt(fd4,SOL_SOCKET,SO_REUSEADDR,(char *)&x,sizeof(x)) Thanks for the info, although it does not seem to to the trick... Perhaps you meant SO_REUSEPORT? If so, I'm not sure that will work for me in this case, as I do actually want it to fail if another instance of the server is running. I'm making the assumption that the sockets returned from accept inherit the options specified on the accepting socket...? (I ran setsockopt on the accepted socket as well, just to be sure...) Rgds, Marc 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?4.2.0.58.20020417144927.00c00e20>