Browse Source

Fixed call state resurrect on heartbeat timeout reconnects.

pull/115/head
Simon Eisenmann 12 years ago
parent
commit
f9ddb71a6f
  1. 2
      static/js/mediastream/api.js
  2. 10
      static/js/mediastream/connector.js

2
static/js/mediastream/api.js

@ -49,7 +49,7 @@ define(['jquery', 'underscore'], function($, _) { @@ -49,7 +49,7 @@ define(['jquery', 'underscore'], function($, _) {
console.log("Reconnecting because alive timeout was reached.");
this.last_receive_overdue = false;
this.last_receive = null;
this.connector.reconnect();
this.connector.disconnect(true);
}
} else {
if (now > last_receive + alive_check_timeout) {

10
static/js/mediastream/connector.js

@ -80,6 +80,16 @@ define(['jquery', 'underscore', 'ua-parser'], function($, _, uaparser) { @@ -80,6 +80,16 @@ define(['jquery', 'underscore', 'ua-parser'], function($, _, uaparser) {
};
Connector.prototype.disconnect = function(error) {
if (error) {
this.onerror(null)
} else {
this.conn.close();
}
};
Connector.prototype.reconnect = function() {
if (!this.url) {

Loading…
Cancel
Save