Commit 6f7a7e86 authored by alexstocks's avatar alexstocks

do not consider empty package as a error

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