refactor a little
fix closure capture bug

but an issue remains when client post an unregistered event getting no
answer.