fix(client): return error instead of unmatched response when idle

This commit is contained in:
Sean McArthur
2017-12-06 14:27:47 -08:00
parent 8f938d97e7
commit 95e0164e8f
4 changed files with 100 additions and 11 deletions

View File

@@ -91,6 +91,10 @@ impl AsyncIo<Buf> {
AsyncIo::new(Buf::wrap(buf.into()), bytes)
}
pub fn new_eof() -> AsyncIo<Buf> {
AsyncIo::new(Buf::wrap(Vec::new().into()), 1)
}
pub fn flushed(&self) -> bool {
self.flushed
}