Skip to content

Commit e3c0993

Browse files
committed
Fix transaction state vacuum in MQTT transport
1 parent a8e0470 commit e3c0993

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

transports/janus_mqtt.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1612,7 +1612,8 @@ static gboolean janus_mqtt_vacuum(gpointer context) {
16121612

16131613
while (g_hash_table_iter_next(&iter, NULL, &value)) {
16141614
janus_mqtt_transaction_state* state = value;
1615-
if(janus_get_monotonic_time() - state->created_at > ctx->vacuum_interval) {
1615+
gint64 diff = (janus_get_monotonic_time() - state->created_at) / G_USEC_PER_SEC;
1616+
if(diff > ctx->vacuum_interval) {
16161617
g_hash_table_iter_remove(&iter);
16171618
}
16181619
}

0 commit comments

Comments
 (0)