forked from TrueCloudLab/frostfs-node
[#2212] morph: Fix subscription restoration
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
c43b2dbac9
commit
9afe86ba3e
2 changed files with 3 additions and 0 deletions
|
@ -226,6 +226,7 @@ func (c *Client) restoreSubscriptions(cli *rpcclient.WSClient, endpoint string)
|
|||
|
||||
// notification events restoration
|
||||
for contract := range c.subscribedEvents {
|
||||
contract := contract // See https://github.com/nspcc-dev/neo-go/issues/2890
|
||||
id, err = cli.SubscribeForExecutionNotifications(&contract, nil)
|
||||
if err != nil {
|
||||
c.logger.Error("could not restore notification subscription after RPC switch",
|
||||
|
@ -242,6 +243,7 @@ func (c *Client) restoreSubscriptions(cli *rpcclient.WSClient, endpoint string)
|
|||
// notary notification events restoration
|
||||
if c.notary != nil {
|
||||
for signer := range c.subscribedNotaryEvents {
|
||||
signer := signer // See https://github.com/nspcc-dev/neo-go/issues/2890
|
||||
id, err = cli.SubscribeForNotaryRequests(nil, &signer)
|
||||
if err != nil {
|
||||
c.logger.Error("could not restore notary notification subscription after RPC switch",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue