broker: fix logic in synchronous event connect