Prevent calls to osd_read/write when m_pSocket is NULL [nw]