Commit 2282528a authored by AlexStocks's avatar AlexStocks

Fix: inc write package number when err == nil in WritePkg

parent 1d7c20c9
......@@ -366,10 +366,9 @@ func (s *session) WritePkg(pkg interface{}, timeout time.Duration) error {
var err error
if timeout <= 0 {
if err = s.writer.Write(s, pkg); err != nil {
s.incWritePkgNum()
// gxlog.CError("after incWritePkgNum, ss:%s", s.Stat())
return perrors.WithStack(err)
}
return perrors.WithStack(err)
s.incWritePkgNum()
}
select {
case s.wQ <- pkg:
......
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