Skip to content

Commit 50d459d

Browse files
committed
Update adaptor.go
1 parent cfbc9d2 commit 50d459d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

multinode/adaptor.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ func (m *Adapter[RPC, HEAD]) LenSubs() int {
5858
}
5959

6060
// RegisterSub adds the sub to the Adaptor list and returns a sub which is managed on unsubscribe
61-
func (m *Adapter[RPC, HEAD]) RegisterSub(sub Subscription) (*ManagedSubscription, error) {
61+
func (m *Adapter[RPC, HEAD]) RegisterSub(sub Subscription, stopInFLightCh chan struct{}) (*ManagedSubscription, error) {
6262
// ensure that the `sub` belongs to current life cycle of the `rpcMultiNodeAdapter` and it should not be killed due to
6363
// previous `DisconnectAll` call.
6464
select {
65-
case <-m.chStopInFlight:
65+
case <-stopInFLightCh:
6666
sub.Unsubscribe()
6767
return nil, fmt.Errorf("failed to register subscription - all in-flight requests were canceled")
6868
default:

0 commit comments

Comments
 (0)