forked from TrueCloudLab/frostfs-node
[#1465] node: Prevent process from killing by systemd when shutting down
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
362f24953a
commit
85cf1f47ac
5 changed files with 104 additions and 74 deletions
|
@ -126,7 +126,20 @@ func (c *Client) notificationLoop() {
|
|||
continue
|
||||
}
|
||||
|
||||
c.notifications <- n
|
||||
select {
|
||||
case c.notifications <- n:
|
||||
continue
|
||||
case <-c.cfg.ctx.Done():
|
||||
_ = c.UnsubscribeAll()
|
||||
c.close()
|
||||
|
||||
return
|
||||
case <-c.closeChan:
|
||||
_ = c.UnsubscribeAll()
|
||||
c.close()
|
||||
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue