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:
@@ -178,6 +178,12 @@ impl FakeServer {
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for FakeServer {
|
||||
fn drop(&mut self) {
|
||||
self.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
pub struct FakeHttpClient {
|
||||
handler: Box<
|
||||
dyn 'static
|
||||
|
||||
Reference in New Issue
Block a user