The already in use is probably coming from the TCP stack which waits a 
certain time before allowing the address to be reused. However I thought 
that the net package already used SO_REUSEADDR to avoid the delay in close 
to reopen.


> The question I'm really asking is not so much how to write code that works 
> in practice (or, rather, appears to do so), but how to be certain (on the 
> basis of the specification and API documentation) that the code is correct.
>

As written the code is correct. Once the listener is closed, you can reopen 
it, modulo TCP stack vagaries. 

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to