Commit 6f7a7e86 authored by alexstocks's avatar alexstocks

do not consider empty package as a error

parent bfb1ea63
......@@ -13,6 +13,10 @@
## develop history ##
---
- 2016/08/23
> do not consider empty package as a error in (Session)handlePackage
> version: 0.2.04
- 2016/08/22
> rename (Session)OnIdle to (Session)OnCron
> rewrite server.go: add Server{done, wg}
......
......@@ -456,14 +456,16 @@ func (this *Session) handlePackage() {
break
}
pkg, err = this.pkgHandler.Read(this, pktBuf)
if err != nil || pkg == nil {
log.Info("%s:%d:%s [session.pkgHandler.Read] = pkg{%#v}, error{%+v}",
this.name, this.Id, this.conn.RemoteAddr().String(), pkg, err)
if err != nil {
log.Info("%s:%d:%s [session.pkgHandler.Read] = error{%+v}",
this.name, this.Id, this.conn.RemoteAddr().String(), err)
exit = true
break
}
if pkg != nil {
this.reqQ <- pkg
}
}
if exit {
break
}
......
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