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

Peer2Peer - changeXMLHTTPRequest To Async #59

Merged
merged 2 commits into from
Mar 17, 2015
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/manual/peer2peer/js/main.js
Original file line number Diff line number Diff line change
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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true is the default... so it can be omitted.

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