Wait for message to arrive