mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-26 10:40:54 +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 {
|
pub struct FakeHttpClient {
|
||||||
handler: Box<
|
handler: Box<
|
||||||
dyn 'static
|
dyn 'static
|
||||||
|
|
Loading…
Reference in a new issue