================
@@ -665,3 +655,40 @@ Status 
AdbClient::SyncService::PullFileChunk(std::vector<char> &buffer,
 Status AdbClient::SyncService::ReadAllBytes(void *buffer, size_t size) {
   return ::ReadAllBytes(*m_conn, buffer, size);
 }
+
+Status AdbClient::SyncService::SetupSyncConnection(const std::string 
&device_id) {
+  if (!m_conn) {
----------------
labath wrote:

This moving of connections around is very unelegant. Could you at least make it 
so that the connection is moved at most once, e.g. created inside AdbClient and 
then moved into this object.

Though ideally, I would try to avoid using AdbClient here at all by making any 
methods that need to operate on the connection static (something similar to 
ReadAllBytes).

https://github.com/llvm/llvm-project/pull/145382
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to