Created
August 16, 2018 21:15
-
-
Save vterdunov/8930d1bb1c7b057ae55e3a8d5a19f3b7 to your computer and use it in GitHub Desktop.
Golang accept connection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conn, err := ln.Accept() | |
if err != nil { | |
if pe, ok := err.(net.Error); ok && pe.Temporary() { | |
continue | |
} | |
return error.Errof("cannot process conns at %s: %s", ln.Addr(), err) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment