do not ignore FIN tcp packet

This commit is contained in:
hebo
2019-09-27 16:48:47 +08:00
parent e2a924c776
commit b79e9f6867
3 changed files with 35 additions and 17 deletions

View File

@@ -11,6 +11,8 @@ import (
)
func Server() {
initConfig()
server := &http.Server{
Addr: "0.0.0.0:" + strconv.Itoa(communicatePort),
IdleTimeout: time.Second * 5,
@@ -22,6 +24,10 @@ func Server() {
}
}
func initConfig() {
_ = catpurePacketRate.setVal(catpurePacketRateVal)
}
func outletCheckAlive(resp http.ResponseWriter, req *http.Request) {
mp := hu.NewMouthpiece(resp)
defer func() {