Commit 2770bf2d authored by alexstocks's avatar alexstocks

set write timeout in session.go:(Session)WritePkg

parent 848c9843
...@@ -15,7 +15,9 @@ ...@@ -15,7 +15,9 @@
> >
> 2 delete session.go:(Session)handlePackage Last clause > 2 delete session.go:(Session)handlePackage Last clause
> >
> 3 version: 0.3.07 > 3 set write timeout in session.go:(Session)WritePkg
>
> 4 version: 0.3.07
- 2016/09/08 - 2016/09/08
> 1 rewrite session.go:(Session)handlePackage() error handle logic > 1 rewrite session.go:(Session)handlePackage() error handle logic
......
...@@ -311,7 +311,8 @@ func (this *Session) WritePkg(pkg interface{}) error { ...@@ -311,7 +311,8 @@ func (this *Session) WritePkg(pkg interface{}) error {
case this.wQ <- pkg: case this.wQ <- pkg:
break // for possible gen a new pkg break // for possible gen a new pkg
default: // default:
case time.After(this.wDeadline):
log.Warn("%s, [session.WritePkg] wQ{len:%d, cap:%d}", this.Stat(), len(this.wQ), cap(this.wQ)) log.Warn("%s, [session.WritePkg] wQ{len:%d, cap:%d}", this.Stat(), len(this.wQ), cap(this.wQ))
return ErrSessionBlocked return ErrSessionBlocked
} }
......
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