Skip to content

Commit 6300abd

Browse files
author
ying32
committed
服务端校验读取超时由10秒改为5秒
1 parent fef6d4b commit 6300abd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ func (s *TRPServer) httpserver() {
8686
}
8787

8888
func (s *TRPServer) cliProcess(conn *net.TCPConn) error {
89-
// 设置10秒超时
90-
conn.SetReadDeadline(time.Now().Add(time.Duration(10) * time.Second))
89+
// 设置5秒超时
90+
conn.SetReadDeadline(time.Now().Add(time.Duration(5) * time.Second))
9191
vval := make([]byte, 20)
9292
_, err := conn.Read(vval)
9393
if err != nil {

0 commit comments

Comments
 (0)