Skip to content

Commit

Permalink
fix: wrapped throwable function in a try catch
Browse files Browse the repository at this point in the history
  • Loading branch information
jsalaber committed Nov 12, 2024
1 parent 5c31040 commit 77952f2
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 77952f2

Please sign in to comment.