mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-04 20:37:40 +03:00
Merge 5d7890f308
into d39c2c2fdd
This commit is contained in:
commit
a35b6d146a
1 changed files with 3 additions and 0 deletions
|
@ -4,6 +4,7 @@ import (
|
|||
"encoding/binary"
|
||||
"io"
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/sagernet/sing/common/buf"
|
||||
M "github.com/sagernet/sing/common/metadata"
|
||||
|
@ -86,6 +87,7 @@ func (c *ServerConn) loopInput() {
|
|||
if err != nil {
|
||||
break
|
||||
}
|
||||
c.SetDeadline(time.Now().Add(2 * time.Minute))
|
||||
}
|
||||
c.Close()
|
||||
}
|
||||
|
@ -100,6 +102,7 @@ func (c *ServerConn) loopOutput() {
|
|||
if err != nil {
|
||||
break
|
||||
}
|
||||
c.SetDeadline(time.Now().Add(2 * time.Minute))
|
||||
if !c.isConnect {
|
||||
err = AddrParser.WriteAddrPort(c.outputWriter, M.SocksaddrFromNet(addr))
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue