Commit 5f02f740 authored by AlexStocks's avatar AlexStocks

UDP_ENDPOINT session should be long live

parent d98ff0fe
......@@ -12,6 +12,10 @@
- 2018/03/17
> improvement
* UDP_ENDPOINT session should be long live.
- 2018/03/17
> improvement
* use getty v0.8.2
- 2018/03/16
......
......@@ -82,7 +82,10 @@ func (this *EchoMessageHandler) OnCron(session getty.Session) {
if conf.sessionTimeout.Nanoseconds() < time.Since(session.GetActive()).Nanoseconds() {
log.Warn("session{%s} timeout{%s}, reqNum{%d}",
session.Stat(), time.Since(session.GetActive()).String(), clientEchoSession.reqNum)
this.client.removeSession(session)
// UDP_ENDPOINT session should be long live.
if this.client != &unconnectedClient {
this.client.removeSession(session)
}
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment