mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-19 02:05:16 +00:00
客户端断线重连bug修复
This commit is contained in:
5
udp.go
5
udp.go
@@ -56,7 +56,10 @@ func (s *UdpModeServer) startTunnelServer() {
|
||||
|
||||
func (s *UdpModeServer) process(addr *net.UDPAddr, data []byte) {
|
||||
conn := s.GetTunnel()
|
||||
conn.WriteHost("udp", s.tunnelTarget)
|
||||
if _, err := conn.WriteHost(CONN_UDP, s.tunnelTarget);err!=nil{
|
||||
conn.Close()
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
for {
|
||||
buf := make([]byte, 1024)
|
||||
|
Reference in New Issue
Block a user