Add test and assertion for idle state handling (#160)
This commit is contained in:
committed by
Carl Lerche
parent
b1d282799b
commit
8a1c4d3d52
@@ -331,6 +331,13 @@ impl State {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn is_idle(&self) -> bool {
|
||||
match self.inner {
|
||||
Idle => true,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn ensure_recv_open(&self) -> Result<bool, proto::Error> {
|
||||
use std::io;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user