Skip to content

Commit

Permalink
Merge pull request #86 from opentok/null-interval
Browse files Browse the repository at this point in the history
only poll getStats if interval is given
  • Loading branch information
fippo authored Mar 18, 2019
2 parents bcd939b + c42117e commit c7de501
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rtcstats.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ module.exports = function(trace, getStatsInterval, prefixesToWrap) {
// TODO: do we want one big interval and all peerconnections
// queried in that or one setInterval per PC?
// we have to collect results anyway so...
if (!isEdge) {
if (!isEdge && getStatsInterval) {
var prev = {};
var interval = window.setInterval(function() {
if (pc.signalingState === 'closed') {
Expand Down

0 comments on commit c7de501

Please sign in to comment.