Browse Source

Evict connection pool entry on logout

master
Simon Ser 4 years ago
parent
commit
85f8530fd3
No known key found for this signature in database GPG Key ID: FDE7BE0E88F5E48
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      conn_pool.go

+ 6
- 0
conn_pool.go View File

@@ -54,5 +54,11 @@ func (pool *ConnPool) Put(conn *imapclient.Client) (token string, err error) {
}

pool.conns[token] = conn

go func() {
<-conn.LoggedOut()
delete(pool.conns, token)
}()

return token, nil
}

Loading…
Cancel
Save