From f02de33f8b6e41b51fa720a2a5488c1260adeff4 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Thu, 15 Apr 2021 13:27:33 +0300 Subject: [PATCH] [#476] cmd/containter: Make network handlers async Make container handlers that do network communication execute asynchronously. Signed-off-by: Pavel Karpy --- cmd/neofs-node/container.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/neofs-node/container.go b/cmd/neofs-node/container.go index 632e445c4..0d53b012a 100644 --- a/cmd/neofs-node/container.go +++ b/cmd/neofs-node/container.go @@ -106,14 +106,14 @@ func initContainerService(c *cfg) { ) setContainerNotificationParser(c, startEstimationNotifyEvent, containerEvent.ParseStartEstimation) - addContainerNotificationHandler(c, startEstimationNotifyEvent, func(ev event.Event) { + addContainerAsyncNotificationHandler(c, startEstimationNotifyEvent, func(ev event.Event) { ctrl.Start(loadcontroller.StartPrm{ Epoch: ev.(containerEvent.StartEstimation).Epoch(), }) }) setContainerNotificationParser(c, stopEstimationNotifyEvent, containerEvent.ParseStopEstimation) - addContainerNotificationHandler(c, stopEstimationNotifyEvent, func(ev event.Event) { + addContainerAsyncNotificationHandler(c, stopEstimationNotifyEvent, func(ev event.Event) { ctrl.Stop(loadcontroller.StopPrm{ Epoch: ev.(containerEvent.StopEstimation).Epoch(), })