From a04f40d61619ac0c38b2bee14336193b90df60a4 Mon Sep 17 00:00:00 2001 From: Pavel Karpy Date: Thu, 15 Apr 2021 13:24:43 +0300 Subject: [PATCH] [#476] cmd/netmap: Make network handlers async Make netmap handlers that do network communication execute asynchronously. Signed-off-by: Pavel Karpy --- cmd/neofs-node/netmap.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/neofs-node/netmap.go b/cmd/neofs-node/netmap.go index c1ff4713f2..2333a648c2 100644 --- a/cmd/neofs-node/netmap.go +++ b/cmd/neofs-node/netmap.go @@ -74,7 +74,7 @@ func initNetmapService(c *cfg) { }) if c.cfgNetmap.reBootstrapEnabled { - addNewEpochNotificationHandler(c, func(ev event.Event) { + addNewEpochAsyncNotificationHandler(c, func(ev event.Event) { n := ev.(netmapEvent.NewEpoch).EpochNumber() if n%c.cfgNetmap.reBootstrapInterval == 0 { @@ -86,7 +86,7 @@ func initNetmapService(c *cfg) { }) } - addNewEpochNotificationHandler(c, func(ev event.Event) { + addNewEpochAsyncNotificationHandler(c, func(ev event.Event) { e := ev.(netmapEvent.NewEpoch).EpochNumber() ni, err := c.netmapLocalNodeState(e)