Skip to content

Commit

Permalink
client: stop remoteUser init on client ctx.Done()
Browse files Browse the repository at this point in the history
This fixes a bug that prevented client shutdown if the client failed to
completely initialize during address book loading.
  • Loading branch information
miki authored and miki-totefu committed Feb 14, 2023
1 parent 41fd091 commit ec56379
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client/client_kx.go
Expand Up @@ -200,6 +200,8 @@ func (c *Client) initRemoteUser(id *zkidentity.PublicIdentity, r *ratchet.Ratche
if !oldUser {
select {
case c.newUsersChan <- ru:
case <-c.ctx.Done():
return nil, errClientExiting
case <-c.runDone:
return nil, errClientExiting
}
Expand Down

0 comments on commit ec56379

Please sign in to comment.