#Is a Listener closed when Accepct returns non-nil error?

10 messages · Page 1 of 1 (latest)

weary lichen
#

Consider the std lib only.
Is a net.Listener or a net.Conn closed when a non-nil error is returned by Accept() / Read() / Write() ? Except for situations where the error is os.ErrDeadlineExceedes.

viral veldt
#

I'd guess no

weary lichen
#

reasons?

viral veldt
#

gut feeling

#

You could look through the stdlib code to make sure

weary lichen
#

can you tell me if the std lib code is deep? i need to set up my network before getting code from google

#

dont wanna spend time set up ny network and find oht the code is too deep for me in the end

#

will go check out if not

viral veldt
#

src/net/net.go line 175