Skip to content

Commit

Permalink
release connections
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor-malene committed May 15, 2024
1 parent 9c6702f commit 1f16e56
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/walletextension/rpcapi/filter_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ func (api *FilterAPI) Logs(ctx context.Context, crit common.FilterCriteria) (*rp
}
return nil
},
nil, // todo - we can implement reconnect logic here
func() {
// release resources
api.closeConnections(backendSubscriptions, backendWSConnections)
}, // todo - we can implement reconnect logic here
&unsubscribedByBackend,
&unsubscribedByClient,
12*time.Hour,
Expand All @@ -126,7 +129,6 @@ func (api *FilterAPI) Logs(ctx context.Context, crit common.FilterCriteria) (*rp
// handles any of the backend connections being closed
go subscriptioncommon.HandleUnsubscribeErrChan(errorChannels, func() {
unsubscribedByBackend.Store(true)
api.closeConnections(backendSubscriptions, backendWSConnections)
})

// handles "unsubscribe" from the user
Expand Down

0 comments on commit 1f16e56

Please sign in to comment.