mirror of
https://github.com/fatedier/frp.git
synced 2026-01-10 10:13:16 +00:00
udp: add heartbeat in udp work connection
This commit is contained in:
@@ -54,8 +54,8 @@ func GetDeaultClientCommonConf() *ClientCommonConf {
|
||||
PrivilegeToken: "",
|
||||
PoolCount: 1,
|
||||
User: "",
|
||||
HeartBeatInterval: 10,
|
||||
HeartBeatTimeout: 30,
|
||||
HeartBeatInterval: 30,
|
||||
HeartBeatTimeout: 90,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ func GetDefaultServerCommonConf() *ServerCommonConf {
|
||||
AuthTimeout: 900,
|
||||
SubDomainHost: "",
|
||||
MaxPoolCount: 10,
|
||||
HeartBeatTimeout: 30,
|
||||
HeartBeatTimeout: 90,
|
||||
UserConnTimeout: 10,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ func ForwardUserConn(udpConn *net.UDPConn, readCh <-chan *msg.UdpPacket, sendCh
|
||||
return
|
||||
}
|
||||
|
||||
func Forwarder(dstAddr *net.UDPAddr, readCh <-chan *msg.UdpPacket, sendCh chan<- *msg.UdpPacket) {
|
||||
func Forwarder(dstAddr *net.UDPAddr, readCh <-chan *msg.UdpPacket, sendCh chan<- msg.Message) {
|
||||
var (
|
||||
mu sync.RWMutex
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user