Don't use the Client's IP blocklist after the Client is closed

Fixes a segfault due to using a memory mapped blocklist in confluence.
This commit is contained in:
Matt Joiner 2021-12-01 15:02:36 +11:00
parent 54d529aac0
commit 69f3b6064e
1 changed files with 1 additions and 1 deletions

View File

@ -503,7 +503,7 @@ func (cl *Client) acceptConnections(l Listener) {
cl.rLock()
closed := cl.closed.IsSet()
var reject error
if conn != nil {
if !closed && conn != nil {
reject = cl.rejectAccepted(conn)
}
cl.rUnlock()