Skip to content

Commit 40726ba

Browse files
committed
fix(native): Don't crash after query cancellation
1 parent e68bd97 commit 40726ba

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

packages/cubejs-backend-native/src/channel.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,12 +155,10 @@ where
155155
Err(err) => Err(CubeError::internal(err.to_string())),
156156
};
157157

158-
tx.send(to_channel).map_err(|_| {
159-
CubeError::internal(
160-
"AsyncChannel: Unable to send result from JS back to Rust, channel closed"
161-
.to_string(),
162-
)
163-
})
158+
if tx.send(to_channel).is_err() {
159+
log::debug!("AsyncChannel: Unable to send result from JS back to Rust, channel closed");
160+
}
161+
Ok(())
164162
}));
165163

166164
channel

0 commit comments

Comments
 (0)