when complete callback is invoked, I would like to unsubscribe and close ws client connection. I found that according to documentation setting InactivityTimeout into anything > 0 should fit perfectly here. But unfortunately, it is not. I think the bug is in the following method:
Hi,
looks like
InactivityTimeout
option of SubscriptionClient does not produce any effect when set to >0
.I have code like this:
when
complete
callback is invoked, I would like to unsubscribe and close ws client connection. I found that according to documentation settingInactivityTimeout
into anything > 0 should fit perfectly here. But unfortunately, it is not. I think the bug is in the following method:https://github.com/apollographql/subscriptions-transport-ws/blob/1578d773caeeac435b5bad3ecbbaec477b4f3380/src/client.ts#L674-L680 the
this.setInactivityTimeout();
is not invoked due to lack ofthis.operations[opId]
as it was removed earlier: https://github.com/apollographql/subscriptions-transport-ws/blob/1578d773caeeac435b5bad3ecbbaec477b4f3380/src/client.ts#L639I think
unsubscribe
method should look more or less like this:can you please look at it, and check it?