must have message processing improvements

@amitmiran What's the reason behind this? Even if there are currently no messages in the JS client side that does not mean that there isn't a message that has just arrived on the read buffer on the C++ side. Waiting doesn't seem like a right solution for this.