Skip to content

Commit

Permalink
fix: wrapped throwable function in a try catch (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsalaber authored Nov 12, 2024
1 parent 5c31040 commit 698b56a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,12 @@ public boolean awaitClosed(final long timeout) throws InterruptedException {

private void closeCurrentStream(ReadyState previousState) {
if (previousState == ReadyState.OPEN) {
handler.onClosed();
try {
handler.onClosed();
} catch (Exception e) {
DevCycleLogger.w("Message handler threw an exception: " + e.toString());
handler.onError(e);
}
}

if (call != null) {
Expand Down

0 comments on commit 698b56a

Please sign in to comment.