Answer the question
In order to leave comments, you need to log in
Why doesn't Golang return an error when writing to net.Conn when the internet is down?
Hello. Here is part of the client code:
func (e *exchanger) trySendByTCP(data []byte) (done bool) {
if e.tcpConnection == nil {
return false
}
_, err := e.tcpConnection.Write(data)
if err != nil {
utils.LogE("Write to TCP error.", err)
}
return err == nil
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question