Skip to content

Commit

Permalink
Merge branch 'meetecho_master'
Browse files Browse the repository at this point in the history
* meetecho_master: (345 commits)
  Remove support for framemarking RTP extension (meetecho#2640)
  Prevent race conditions on socket close in SIP and NoSIP plugins (meetecho#2599)
  Fixed overflow runtime error
  Fix for race condition between VideoRoom publisher leaving and subscriber hanging up (fixes meetecho#2582) (meetecho#2637)
  Send PLI when starting a paused stream (meetecho#2645)
  Prevent too high shift exponent
  Fixed type of seq/ts in file-based Streaming mountpoint threads
  Fix missing g_thread_unref when a streaming helper thread quits.
  Added custom headers for SIP INFO request (meetecho#2644)
  Free participant->user_id_str in case of opus enc/decoder error.
  Reject flexfec when offered, as still unsupported (see meetecho#2639)
  Don't add rtx ssrc if m-line is recvonly/inactive (see meetecho#2639)
  Added NULL checks for json_dumps (see meetecho#2629)
  Parse custom headers, if required, in successful REGISTER response (fixes meetecho#2636)
  Timestamp correction for janus-pp-rec (meetecho#2573)
  Don't chain error handler to success handler in Janus.httpAPICall (meetecho#2569)
  Add missing library link for WS event handler (fixes meetecho#2628)
  Fixed broken switch in Streaming plugin when using helper threads
  Resolves meetecho#2624 jansson double referencing (meetecho#2634)
  Unlock mountpoints mutex after the spawning of helper threads.
  ...

# Conflicts:
#	transports/janus_mqtt.c
  • Loading branch information
imhao183 authored and heavyrain2012 committed Jul 29, 2021
1 parent 3bbf2f0 commit 3529b8d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion transports/janus_mqtt.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ static struct janus_json_parameter configure_parameters[] = {
#define JANUS_MQTT_ERROR_UNKNOWN_ERROR 499


static int g_continue_failure_count = 0;

/* MQTT client context */
typedef struct janus_mqtt_context {
janus_transport_callbacks *gateway;
Expand Down Expand Up @@ -928,11 +930,18 @@ int janus_mqtt_send_message(janus_transport_session *transport, void *request_id
#endif

if(rc != MQTTASYNC_SUCCESS) {
g_continue_failure_count++;
JANUS_LOG(LOG_ERR, "Can't publish to MQTT topic: %s, return code: %d\n", admin ? ctx->admin.publish.topic : ctx->publish.topic, rc);
} else {
g_continue_failure_count = 0;
}

if(g_continue_failure_count > 10) {
exit(EXIT_FAILURE);
}

json_decref(message);
free(payload);

return 0;
}

Expand Down

0 comments on commit 3529b8d

Please sign in to comment.