Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fail faster and only open a new stream if there isn't one already.

  • Loading branch information...
commit 9f48433a814b0843f817079043f1d37740c60aa7 1 parent 804765d
@paulbaumgart paulbaumgart authored
Showing with 4 additions and 6 deletions.
  1. +4 −6 engines/rhino/lib/http-client-engine.js
View
10 engines/rhino/lib/http-client-engine.js
@@ -25,12 +25,10 @@ exports.open = function(url, mode, options) {
}
function startRequest(writeable) {
- if (!connection.connected)
- {
- connection.setDoOutput(writeable);
- connection.connect();
- if (writeable)
- output = new IO(null, connection.getOutputStream());
+ connection.setDoOutput(writeable);
+ connection.connect();
+ if (!output && writeable) {
+ output = new IO(null, connection.getOutputStream());
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.