I don't think he wants to re-use the port. It sounds like he has code which hunts for a free port to bind to, in the range 9000 to 9000+N. It does this by binding to a port in that range, and if it fails, picking a new port and repeating. There are multiple tasks doing this concurrently, and sometimes, two tasks end up (wrongly) thinking they have found the same free port.
At least, that was how I understood the post - I stand to be corrected. -- 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]. To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/664f5042-1a77-4fbf-afec-e6fb00bb1bcen%40googlegroups.com.
