server/util.go

8 lines
125 B
Go
Raw Normal View History

2017-11-07 08:38:50 +00:00
package server
import "io"
func IsClientDisconnect(err error) bool {
return err == io.ErrUnexpectedEOF || err == io.EOF
}