mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
Add support for graceful shutdown
Fixes #1014 Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -101,10 +101,12 @@ type eventRulesContainer struct {
|
||||
}
|
||||
|
||||
func (r *eventRulesContainer) addAsyncTask() {
|
||||
activeHooks.Add(1)
|
||||
r.concurrencyGuard <- struct{}{}
|
||||
}
|
||||
|
||||
func (r *eventRulesContainer) removeAsyncTask() {
|
||||
activeHooks.Add(-1)
|
||||
<-r.concurrencyGuard
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user