tun2: catch panics
This commit is contained in:
parent
941f1042e9
commit
235eed3d84
|
@ -340,6 +340,12 @@ func (s *Server) HandleConn(c net.Conn, isKCP bool) {
|
||||||
Auth: auth,
|
Auth: auth,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defer func() {
|
||||||
|
if r := recover(); r != nil {
|
||||||
|
ln.Log(connection, ln.F{"action": "connection handler panic", "err": r})
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
ln.Log(ln.F{
|
ln.Log(ln.F{
|
||||||
"action": "backend_connected",
|
"action": "backend_connected",
|
||||||
}, connection.F())
|
}, connection.F())
|
||||||
|
|
Loading…
Reference in New Issue