Skip to content

Commit

Permalink
Make sure to provide a timeout and callback to Url's ByteArrayInputSt…
Browse files Browse the repository at this point in the history
…ream and MslControl.receive()'s MessageInputStream.
  • Loading branch information
wmiaw committed Sep 9, 2016
1 parent 3bdefe4 commit 716f77e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 3 additions & 2 deletions core/src/main/javascript/io/Url.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,9 @@ var IHttpLocation = util.Class.create({
close: function close(timeout, callback) {
InterruptibleExecutor(callback, function() {
if (this._buffer)
this._buffer.close();
return true;
this._buffer.close(timeout, callback);
else
return true;
}, this);
},

Expand Down
6 changes: 5 additions & 1 deletion core/src/main/javascript/msg/MslControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -2944,7 +2944,11 @@ var MslControl$MslChannel;
function handshakeResponse(request) {
InterruptibleExecutor(callback, function() {
// Close the request. We're done with it.
request.close();
request.close(this._timeout, {
result: function() {},
timeout: function() {},
error: function() {}
});

// This is a handshake request so automatically return a response.
//
Expand Down

0 comments on commit 716f77e

Please sign in to comment.