• Mikio Hara's avatar
    net: prevent spurious on-connect events via epoll on linux · c0325f50
    Mikio Hara authored
    On Linux, adding a socket descriptor to epoll instance before getting
    the EINPROGRESS return value from connect system call could be a root
    cause of spurious on-connect events.
    
    See golang.org/issue/8276, golang.org/issue/8426 for further information.
    
    All credit to Jason Eggleston <jason@eggnet.com>
    
    Fixes #8276.
    Fixes #8426.
    
    LGTM=dvyukov
    R=dvyukov, golang-codereviews, adg, dave, iant, alex.brainman
    CC=golang-codereviews
    https://golang.org/cl/120820043
    c0325f50
sock_posix.go 5.29 KB