mirror of https://github.com/fatedier/frp.git
visitor: fix panic
This commit is contained in:
parent
ae9a4623d9
commit
1a6a179b68
|
@ -259,7 +259,11 @@ func (sv *XtcpVisitor) handleConn(userConn frpNet.Conn) {
|
|||
sv.Trace("send all detect msg done")
|
||||
|
||||
// Listen for visitorConn's address and wait for client connection.
|
||||
lConn, _ := net.ListenUDP("udp", laddr)
|
||||
lConn, err := net.ListenUDP("udp", laddr)
|
||||
if err != nil {
|
||||
sv.Error("listen on visitorConn's local adress error: %v", err)
|
||||
return
|
||||
}
|
||||
lConn.SetReadDeadline(time.Now().Add(5 * time.Second))
|
||||
sidBuf := pool.GetBuf(1024)
|
||||
n, _, err = lConn.ReadFromUDP(sidBuf)
|
||||
|
|
Loading…
Reference in New Issue