Add some defensive coding in socket. Check m_recv_reply before using it.