1
0
mirror of https://github.com/ManyakRus/starter.git synced 2025-11-23 22:45:11 +02:00

сделал defer stopapp.GetWaitGroup_Main().Done()

This commit is contained in:
Nikitin Aleksandr
2025-05-15 14:08:51 +03:00
parent 18ee0e3d6b
commit 6bb95b522c
22 changed files with 40 additions and 33 deletions

View File

@@ -119,6 +119,7 @@ func CloseConnection() {
// WaitStop - ожидает отмену глобального контекста или сигнала завершения приложения
func WaitStop() {
defer stopapp.GetWaitGroup_Main().Done()
select {
case <-contextmain.GetContext().Done():
@@ -130,7 +131,6 @@ func WaitStop() {
//закрываем соединение
CloseConnection()
stopapp.GetWaitGroup_Main().Done()
}
// SendResponseError - Отправляет ответ в NATS SyncExchange