Skip to content

Commit

Permalink
fix id GET request caching bug
Browse files Browse the repository at this point in the history
  • Loading branch information
michelle committed Mar 6, 2013
1 parent 6b14a5f commit be2875d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions dist/peer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,8 @@ Peer.prototype._getId = function(cb) {
try {
var http = new XMLHttpRequest();
var url = 'http://' + this._options.host + ':' + this._options.port + '/' + this._options.key + '/id';
var queryString = '?ts=' + new Date().getTime() + '' + Math.random();
url += queryString;
// If there's no ID we need to wait for one before trying to init socket.
http.open('get', url, true);
http.onreadystatechange = function() {
Expand Down
Loading

0 comments on commit be2875d

Please sign in to comment.