mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-26 02:37:05 +00:00
Disconnect FakeServer when dropping it
This prevents memory leak errors in tests, due to parked tasks waiting for RPC responses.
This commit is contained in:
parent
3ea061a11e
commit
b70396b8fb
1 changed files with 6 additions and 0 deletions
|
@ -178,6 +178,12 @@ impl FakeServer {
|
|||
}
|
||||
}
|
||||
|
||||
impl Drop for FakeServer {
|
||||
fn drop(&mut self) {
|
||||
self.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
pub struct FakeHttpClient {
|
||||
handler: Box<
|
||||
dyn 'static
|
||||
|
|
Loading…
Reference in a new issue