Skip to content

Commit

Permalink
Feature/dcerror verbosity (#27)
Browse files Browse the repository at this point in the history
* wasm: add more verbose logging to dc-error

* wasm: RTCErrorEvent just has the error attribute
  • Loading branch information
z-dule authored Sep 9, 2021
1 parent f93f434 commit 8ae56a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wasm/src/avs_pc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1194,8 +1194,8 @@ function setupDataChannel(pc: PeerConnection, dc: RTCDataChannel) {
pc_log(LOG_LEVEL_INFO, "dc-closed");
ccallDcStateChangeHandler(pc, DC_STATE_CLOSED);
};
dc.onerror = () => {
pc_log(LOG_LEVEL_INFO, "dc-error");
dc.onerror = event => {
pc_log(LOG_LEVEL_INFO, `dc-error: ${event.error}`);
ccallDcStateChangeHandler(pc, DC_STATE_ERROR);
};
dc.onmessage = event => {
Expand Down

0 comments on commit 8ae56a4

Please sign in to comment.