Skip to content

Commit 7b8bf24

Browse files
committed
v2.8.1
1 parent 9ec2bb9 commit 7b8bf24

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

gost.go

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import (
1111
"io"
1212
"math/big"
1313
"net"
14+
"net/http"
1415
"strings"
1516
"sync"
1617
"time"
@@ -19,7 +20,7 @@ import (
1920
)
2021

2122
// Version is the gost version.
22-
const Version = "2.8.0"
23+
const Version = "2.8.1"
2324

2425
// Debug is a flag that enables the debug log.
2526
var Debug bool
@@ -200,3 +201,11 @@ func splitLine(line string) []string {
200201
}
201202
return ss
202203
}
204+
205+
func connStateCallback(conn net.Conn, cs http.ConnState) {
206+
switch cs {
207+
case http.StateNew:
208+
conn.SetReadDeadline(time.Now().Add(30 * time.Second))
209+
default:
210+
}
211+
}

0 commit comments

Comments
 (0)