On Monday, September 11, 2017 at 5:53:10 AM UTC-4, Shivaram Lingamneni wrote: > > > 1. Using `Listener.Close()` to interrupt the `Listener.Accept()` call > on the other goroutine > 2. Using a channel to tell the other goroutine that it should call > `Listener.Close()` itself and exit > 3. Using a channel to wait for the other goroutine to complete its > call to `Listener.Close()` > >
Rather than waiting for just the `Listener.Close` call to return, try waiting for the call to `Listener.Accept()` to return with a non-Temporary error. That should error as the result of the file descriptor being closed, and give you the ordering you need. -- 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 golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.