Skip to content

Commit

Permalink
Merge pull request #1 from johnmanjiro13/continue-when-error
Browse files Browse the repository at this point in the history
fix: Continue when some error occurred
  • Loading branch information
johnmanjiro13 committed Jan 8, 2023
2 parents c941471 + 328532e commit bddfeed
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,17 @@ impl Worker {
let mut buf = Vec::new();
match record.serialize(&mut Serializer::new(&mut buf)) {
Ok(_) => (),
Err(e) => warn!("failed to serialize a message: {}", e),
Err(e) => {
warn!("failed to serialize a message: {}", e);
continue;
}
}
match self.conn.write_all(&buf).await {
Ok(_) => (),
Err(e) => warn!("failed to send a message to the fluent server: {}", e),
Err(e) => {
warn!("failed to send a message to the fluent server: {}", e);
continue;
}
}
}
Err(channel::TryRecvError::Empty) => continue,
Expand Down

0 comments on commit bddfeed

Please sign in to comment.