Skip to content

Commit

Permalink
Merge pull request #97 from divebomb/master
Browse files Browse the repository at this point in the history
Fix: close client before close sessions
  • Loading branch information
ralf0131 authored Jun 17, 2019
2 parents c8554c3 + 36ff235 commit 23f39b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions protocol/dubbo/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,13 @@ func (c *gettyRPCClient) close() error {
c.once.Do(func() {
// delete @c from client pool
c.pool.remove(c)
c.gettyClient.Close()
c.gettyClient = nil
for _, s := range c.sessions {
logger.Infof("close client session{%s, last active:%s, request number:%d}",
s.session.Stat(), s.session.GetActive().String(), s.reqNum)
s.session.Close()
}
c.gettyClient.Close()
c.gettyClient = nil
c.sessions = c.sessions[:0]

c.created = 0
Expand Down

0 comments on commit 23f39b2

Please sign in to comment.