Skip to content
Snippets Groups Projects
Unverified Commit 23f39b24 authored by Huxing Zhang's avatar Huxing Zhang Committed by GitHub
Browse files

Merge pull request #97 from divebomb/master

Fix: close client before close sessions
parents c8554c30 36ff2350
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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