Open Madajevas opened 1 day ago
In repository correct callback index is used when removing handler: https://github.com/SignalR/SignalR/blob/336c877743924c990aeefc75930d63e609e624ac/src/Microsoft.AspNet.SignalR.JS/jquery.signalR.hubs.js#L190-L205
In NPM, however, i from loop above is used, which at the time of removal points at last element of handlers array:
i
https://www.npmjs.com/package/signalr?activeTab=code
Calling off on hub proxy removes correct handler
off
Call off removes nothing. Handler is still being called
It was fixed in https://github.com/SignalR/SignalR/pull/4659 which will be in 2.4.4
In repository correct callback index is used when removing handler: https://github.com/SignalR/SignalR/blob/336c877743924c990aeefc75930d63e609e624ac/src/Microsoft.AspNet.SignalR.JS/jquery.signalR.hubs.js#L190-L205
In NPM, however,
i
from loop above is used, which at the time of removal points at last element of handlers array:https://www.npmjs.com/package/signalr?activeTab=code
Expected behavior
Calling
off
on hub proxy removes correct handlerActual behavior
Call
off
removes nothing. Handler is still being calledSteps to reproduce
off