On Fri, Apr 17, 2009 at 11:37 AM, Francis De Brabandere
<[email protected]> wrote:
> I start up a ftp server in my unit tests. But I want to make sure
> there is only one instance running on a port, starting a second server
> on the same port should fail (throw an exception).
>
> Right now the second server starts up without errors but making a
> connection to the port used gives me the first server...

I'm guessing this is on WIndows? Windows has a weird (or wrong)
treatment of SO_REUSEADDR. You can read more about it here:
http://msdn.microsoft.com/en-us/library/ms740621(VS.85).aspx

This has been discussed here before, but with no good resolution. One
possibility is that we could make our use of SO_REUSEADDR
configurable.

/niklas

Reply via email to