mirror of
https://github.com/lwch/natpass.git
synced 2024-04-21 12:41:54 +00:00
正确处理连接断开逻辑
This commit is contained in:
@@ -36,6 +36,7 @@ func (v *VNC) WS(pool *pool.Pool, w http.ResponseWriter, r *http.Request) {
|
||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
defer local.Close()
|
||||
ch := conn.ChanRead(id)
|
||||
defer conn.SendDisconnect(v.link.target, v.link.targetIdx, v.link.id)
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
|
||||
Reference in New Issue
Block a user