Skip to content

Commit

Permalink
Reconnect if the response is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrs committed Feb 27, 2019
1 parent 987b226 commit fb1a546
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/connect.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ where

if read_size == 0 {
warn!("Received empty response, chunk: {}.", chunk);
if let Err(err) = self.reconnect() {
warn!("Failed to reconnect: {:?}.", err);
}
Err(Error::Transient(MyError::NoAckResponseError))
} else {
let reply =
Expand Down

0 comments on commit fb1a546

Please sign in to comment.