Reputation: 23607
In Go, a call to the net.Listener
type's Accept
method returns an error. However, is there a way to tell the difference between a transient error (ie, this connection failed to set up) vs a permanent error (ie, the listener is dead, such as a Unix domain socket file that was forcibly removed)? If I can't tell the difference, I run the risk of infinite looping and spitting out errors as fast as I can since each Accept
call will immediately return an error.
Upvotes: 1
Views: 44