forked from TrueCloudLab/frostfs-node
[#476] cmd/netmap: Make network handlers async
Make netmap handlers that do network communication execute asynchronously. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
91e0f4b370
commit
a04f40d616
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue