Emit warnings after off is called (#1513)
* Emit warnings after off is called If a handler has been registered, and then gets unregistered, the key/methodname still exists in the map and signalr does not warn about a missing handler. Might be by design, but I like it this way.
This commit is contained in:
parent
5cc4f315cb
commit
c4eb501343
|
|
@ -267,6 +267,9 @@ export class HubConnection {
|
|||
const removeIdx = handlers.indexOf(method);
|
||||
if (removeIdx !== -1) {
|
||||
handlers.splice(removeIdx, 1);
|
||||
if (handlers.length === 0) {
|
||||
this.methods.delete(methodName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue