Automattic/socket.io-client — pull request #790 by KamalAman (2014-11-25 20:42:40+00:00)
Title: Empty _callback event listeners are removed

When a specific callback listener was removed from a socket, the event listener could contain no callbacks. This code checks if the listener array has any callbacks on it after the specific callback is remove, if it doesn't have any other callbacks the listener is removed .