Skip to content

Commit

Permalink
refine code
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Sep 15, 2024
1 parent 4ff513a commit 5aa69a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/async_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl AsyncSession {
let shutdown_event = self.session.shutdown_event.get_handle();
match blocking::unblock(move || Self::wait_for_read(read_event, shutdown_event)).await {
WaitingStopReason::Shutdown => {
return Err(std::io::Error::new(std::io::ErrorKind::Other, "Shutdown"));
return Err(crate::Error::ShuttingDown.into());
}
WaitingStopReason::Ready => continue,
}
Expand Down

0 comments on commit 5aa69a3

Please sign in to comment.