Prevent both afterDisconnect AND onDisconnect from being set.