mirror of
https://github.com/shtorm-7/sing-box-extended.git
synced 2026-07-23 07:43:29 +03:00
Fix read deadline implementation
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"github.com/sagernet/sing-box/common/tls"
|
||||
"github.com/sagernet/sing-box/option"
|
||||
"github.com/sagernet/sing/common"
|
||||
"github.com/sagernet/sing/common/bufio/deadline"
|
||||
M "github.com/sagernet/sing/common/metadata"
|
||||
N "github.com/sagernet/sing/common/network"
|
||||
|
||||
@@ -66,7 +67,7 @@ func (s *Server) Tun(server GunService_TunServer) error {
|
||||
}
|
||||
}
|
||||
}
|
||||
go s.handler.NewConnection(ctx, conn, metadata)
|
||||
go s.handler.NewConnection(ctx, deadline.NewConn(conn), metadata)
|
||||
<-ctx.Done()
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user