Skip to content
This repository has been archived by the owner on May 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #59 from webrtc/changeXMLHTTPRequestToAsync
Browse files Browse the repository at this point in the history
Peer2Peer - changeXMLHTTPRequest To Async
  • Loading branch information
KaptenJansson committed Mar 17, 2015
2 parents e11a9c1 + 11bebee commit ca8ceed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/manual/peer2peer/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ function connect(serverUrl, clientName) {
global.ourClientName = clientName;

var request = new XMLHttpRequest();
request.open('GET', serverUrl + '/sign_in?' + clientName, true);
request.open('GET', serverUrl + '/sign_in?' + clientName);
print_(serverUrl + '/sign_in?' + clientName);
request.onreadystatechange = function() {
connectCallback_(request);
Expand Down Expand Up @@ -751,7 +751,7 @@ function sendToPeer(peer, message) {
var request = new XMLHttpRequest();
var url = global.serverUrl + '/message?peer_id=' + global.ourPeerId + '&to=' +
peer;
request.open('POST', url, false);
request.open('POST', url, true);
request.setRequestHeader('Content-Type', 'text/plain');
request.send(message);
}
Expand Down Expand Up @@ -789,7 +789,7 @@ function disconnect_() {
}
var request = new XMLHttpRequest();
request.open('GET', global.serverUrl + '/sign_out?peer_id=' +
global.ourPeerId, false);
global.ourPeerId, true);
request.send();
global.ourPeerId = 'undefined';
print_('ok-disconnected');
Expand Down Expand Up @@ -1226,7 +1226,7 @@ function startHangingGet_(server, ourId) {
};
var callUrl = server + '/wait?peer_id=' + ourId;
print_('Sending ' + callUrl);
hangingGetRequest.open('GET', callUrl, true);
hangingGetRequest.open('GET', callUrl);
hangingGetRequest.send();
}

Expand Down

0 comments on commit ca8ceed

Please sign in to comment.