diff --git a/main.go b/main.go index 382f35f..66d319b 100644 --- a/main.go +++ b/main.go @@ -53,6 +53,7 @@ func main() { sessionUC := sessionsUseCase.NewUseCase(sessionRepo, cfg) gserver := grpc.NewServer(grpc.UnaryInterceptor(usersDelivery.TokenInterceptor(sessionUC))) + defer gserver.GracefulStop() usersDelivery.NewUserHandlers(gserver, userUC) sessionsDelivery.NewSessionHandlers(gserver, sessionUC, userUC)