Skip to content

Commit

Permalink
fix(native): Don't crash after query cancellation
Browse files Browse the repository at this point in the history
  • Loading branch information
MazterQyou committed Feb 8, 2024
1 parent e68bd97 commit 40726ba
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions packages/cubejs-backend-native/src/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,10 @@ where
Err(err) => Err(CubeError::internal(err.to_string())),
};

tx.send(to_channel).map_err(|_| {
CubeError::internal(
"AsyncChannel: Unable to send result from JS back to Rust, channel closed"
.to_string(),
)
})
if tx.send(to_channel).is_err() {
log::debug!("AsyncChannel: Unable to send result from JS back to Rust, channel closed");
}
Ok(())
}));

channel
Expand Down

0 comments on commit 40726ba

Please sign in to comment.