Skip to content

Commit

Permalink
fix: Handle timeout from jibri as an error. (#1144)
Browse files Browse the repository at this point in the history
  • Loading branch information
bgrozev authored Mar 19, 2024
1 parent fb29dc8 commit ac6cb05
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions jicofo/src/main/java/org/jitsi/jicofo/jibri/JibriSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -368,18 +368,24 @@ synchronized public void stop(Jid initiator)
logger.error(
"Unexpected response to stop iq: "
+ (stanza != null ? XmlStringBuilderUtil.toStringOpt(stanza) : "null"));
stopError(stopRequest.getTo());
}
}).onError(exception ->
{
logger.error("Error from stop request: " + exception.toString());
stopError(stopRequest.getTo());
});
}

JibriIq error = new JibriIq();
private void stopError(Jid jibriJid)
{
JibriIq error = new JibriIq();

error.setFrom(stopRequest.getTo());
error.setFailureReason(FailureReason.ERROR);
error.setStatus(Status.OFF);
error.setFrom(jibriJid);
error.setFailureReason(FailureReason.ERROR);
error.setStatus(Status.OFF);

processJibriIqFromJibri(error);
}
}).onError(exception ->
logger.error(
"Error sending stop iq: " + exception.toString()));
processJibriIqFromJibri(error);
}

private void cleanupSession()
Expand Down

0 comments on commit ac6cb05

Please sign in to comment.