[#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
|
@ -26,6 +26,7 @@ Changelog for FrostFS Node
|
||||||
- Set flag `mode` required for `frostfs-cli control shards set-mode` (#8)
|
- Set flag `mode` required for `frostfs-cli control shards set-mode` (#8)
|
||||||
- Fix `dirty` suffix in debian package version (#53)
|
- Fix `dirty` suffix in debian package version (#53)
|
||||||
- Prevent node process from killing by systemd when shutting down (#1465)
|
- Prevent node process from killing by systemd when shutting down (#1465)
|
||||||
|
- Restore subscriptions correctly on morph client switch (#2212)
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
### Updated
|
### Updated
|
||||||
|
|
|
@ -226,6 +226,7 @@ func (c *Client) restoreSubscriptions(cli *rpcclient.WSClient, endpoint string)
|
||||||
|
|
||||||
// notification events restoration
|
// notification events restoration
|
||||||
for contract := range c.subscribedEvents {
|
for contract := range c.subscribedEvents {
|
||||||
|
contract := contract // See https://github.com/nspcc-dev/neo-go/issues/2890
|
||||||
id, err = cli.SubscribeForExecutionNotifications(&contract, nil)
|
id, err = cli.SubscribeForExecutionNotifications(&contract, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.logger.Error("could not restore notification subscription after RPC switch",
|
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
|
// notary notification events restoration
|
||||||
if c.notary != nil {
|
if c.notary != nil {
|
||||||
for signer := range c.subscribedNotaryEvents {
|
for signer := range c.subscribedNotaryEvents {
|
||||||
|
signer := signer // See https://github.com/nspcc-dev/neo-go/issues/2890
|
||||||
id, err = cli.SubscribeForNotaryRequests(nil, &signer)
|
id, err = cli.SubscribeForNotaryRequests(nil, &signer)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.logger.Error("could not restore notary notification subscription after RPC switch",
|
c.logger.Error("could not restore notary notification subscription after RPC switch",
|
||||||
|
|
Loading…
Reference in a new issue