Check and wait for client to connect before emitting