-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: log websocket send error on canister
- Loading branch information
Showing
3 changed files
with
5 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,5 @@ mod types; | |
|
||
use mappings::*; | ||
use repositories::*; | ||
use services::*; | ||
pub use services::*; | ||
pub use types::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
use crate::api::DeploymentUpdateWsMessage; | ||
use crate::api::{log_error, DeploymentUpdateWsMessage}; | ||
use ic_websocket_cdk::ClientPrincipal; | ||
|
||
pub fn send_canister_update(client_principal: ClientPrincipal, update: DeploymentUpdateWsMessage) { | ||
// print(format!("Sending message: {:?}", update)); | ||
if ic_websocket_cdk::send(client_principal, update.candid_serialize()).is_err() { | ||
// print(format!("Could not send message: {}", e)); | ||
if let Err(e) = ic_websocket_cdk::send(client_principal, update.candid_serialize()) { | ||
log_error!(format!("Failed to send ws message: {:?}", e), "websocket") | ||
} | ||
} |