Fixed bug in recv where msg would be invalid after std::move(buf).