mirror of
https://github.com/v2fly/v2ray-core.git
synced 2025-09-23 18:54:05 -04:00
fix http error test
This commit is contained in:
@@ -10,6 +10,7 @@ import (
|
||||
type Server struct {
|
||||
Port net.Port
|
||||
MsgProcessor func(msg []byte) []byte
|
||||
ShouldClose bool
|
||||
SendFirst []byte
|
||||
Listen net.Address
|
||||
listener *net.TCPListener
|
||||
@@ -65,6 +66,9 @@ func (server *Server) handleConnection(conn net.Conn) {
|
||||
fmt.Println("Failed to write response:", err)
|
||||
break
|
||||
}
|
||||
if server.ShouldClose {
|
||||
break
|
||||
}
|
||||
}
|
||||
conn.Close()
|
||||
}
|
||||
|
Reference in New Issue
Block a user