mirror of
https://github.com/MetaCubeX/mihomo.git
synced 2026-11-30 07:58:31 +00:00
fix: gun reader error handling
This commit is contained in:
1 parent
5f7e78a193
commit
5d8e2d2b87
1 file changed
+3
@@ -112,6 +112,9 @@ func (g *Conn) read(b []byte) (n int, err error) {
|
||||
var discard [6]byte
|
||||
_, err = io.ReadFull(g.reader, discard[:])
|
||||
if err != nil {
|
||||
if err == io.ErrUnexpectedEOF {
|
||||
err = io.EOF
|
||||
}
|
||||
return 0, err
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user