Skip to content

Commit

Permalink
when requesting a reservation set the local http connection so that i…
Browse files Browse the repository at this point in the history
…f a reservation fails, the connection is still 'disconnected'
  • Loading branch information
chenson42 committed Sep 9, 2009
1 parent 888714c commit eb6b9a7
Showing 1 changed file with 6 additions and 6 deletions.
Expand Up @@ -96,12 +96,12 @@ private void closeWriter() throws IOException {
* @throws {@link AuthenticationException}
*/
private void requestReservation() throws IOException {
HttpURLConnection c = (HttpURLConnection) url.openConnection();
c.setUseCaches(false);
c.setConnectTimeout(httpTimeout);
c.setReadTimeout(httpTimeout);
c.setRequestMethod("HEAD");
analyzeResponseCode(c.getResponseCode());
connection = (HttpURLConnection) url.openConnection();
connection.setUseCaches(false);
connection.setConnectTimeout(httpTimeout);
connection.setReadTimeout(httpTimeout);
connection.setRequestMethod("HEAD");
analyzeResponseCode(connection.getResponseCode());
}

public BufferedWriter open() throws IOException {
Expand Down

0 comments on commit eb6b9a7

Please sign in to comment.