Explorar el Código

queue_packet: move packet vector instead of copying

Davin McCall hace 11 meses
padre
commit
da33da4fac
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/control.cc

+ 1 - 1
src/control.cc

@@ -1218,7 +1218,7 @@ bool control_conn_t::queue_packet(std::vector<char> &&pkt) noexcept
     }
     
     try {
-        outbuf.emplace_back(pkt);
+        outbuf.emplace_back(std::move(pkt));
         iob.set_watches(in_flag | OUT_EVENTS);
         return true;
     }