Commit 96ceb767 authored by AlexStocks's avatar AlexStocks Committed by watermelo

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

parent a5defb42
......@@ -371,10 +371,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