Fixed a bug where the event callback wouldn't be registered on sockets from listeners

Signed-off-by: Toon Schoenmakers <nighteyes1993@gmail.com>