Hi, After step 3 in my list the socket isn't even in time_wait, it's completely gone, so I don't know what the problem is. Maybe something gets messed up internally? Anyway, we solved this with an external check like this: http://www.mail-archive.com/[email protected]/msg00750.html
Thanks /Magnus -----Original Message----- From: Niklas Gustavsson [mailto:[email protected]] Sent: den 7 september 2010 13:12 To: [email protected] Subject: Re: Multiple listeners allowed on same port > From: <[email protected]> > 1) Server1: listen > 2) Server2: listen (this fails as it should) > 3) Server1: close > 4) Server2: listen > > Step 4 is seemingly successful, but when I connect with a client > FtpHandlerAdapter only runs sessionCreated and never reaches > sessionOpened. I'm guessing this happens while the old socket is in TIME_WAIT state. Could you check with netstat that when the socket goes away (might take 5 minutes), you can launch the server as expected? This is what SO_REUSEADDR is supposed to enable (that you can reuse the address during TIME_WAIT). /niklas
