Browse Source

net/channel: Fix p2p logging memory leak.

Luther Blissett 4 years ago
parent
commit
b0989905cc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/net/channel.rs

+ 1 - 1
src/net/channel.rs

@@ -53,7 +53,7 @@ impl ChannelInfo {
             "last_status": self.last_status,
             "log": self.log.lock().await.clone(),
         });
-        self.log.lock().await.clear();
+        *self.log.lock().await = Vec::new();
         result
     }
 }