fixed an issue when the client sends message earlier than the server registers the 'message' callback

...sed, and defer the message delivery till 'ready'