• Roger Peppe's avatar
    net/rpc: avoid racy use of closing flag. · 7edd1335
    Roger Peppe authored
    It's accessed without mutex protection
    in a different goroutine from the one that
    sets it.
    
    Also make sure that Client.Call after Client.Close
    will reliably return ErrShutdown, and that clients
    see ErrShutdown rather than io.EOF when appropriate.
    
    Suggestions welcome for a way to reliably test
    the mutex issue.
    
    R=r, iant
    CC=golang-dev
    https://golang.org/cl/7338045
    7edd1335
client.go 8.47 KB