handle cancellation of network requests

Change-Id: Ic1aa6db95ea80296e7974d40b017f2b93b7e32fb
diff --git a/org.eclipse.mylyn.hudson.core/src/org/eclipse/mylyn/internal/hudson/core/client/RestfulHudsonClient.java b/org.eclipse.mylyn.hudson.core/src/org/eclipse/mylyn/internal/hudson/core/client/RestfulHudsonClient.java
index 446a181..e6a2613 100644
--- a/org.eclipse.mylyn.hudson.core/src/org/eclipse/mylyn/internal/hudson/core/client/RestfulHudsonClient.java
+++ b/org.eclipse.mylyn.hudson.core/src/org/eclipse/mylyn/internal/hudson/core/client/RestfulHudsonClient.java
@@ -40,6 +40,7 @@
 import org.apache.http.client.methods.HttpPost;
 import org.apache.http.client.methods.HttpRequestBase;
 import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.OperationCanceledException;
 import org.eclipse.mylyn.builds.core.spi.AbstractConfigurationCache;
 import org.eclipse.mylyn.commons.core.operations.IOperationMonitor;
 import org.eclipse.mylyn.commons.repositories.core.RepositoryLocation;
@@ -302,6 +303,8 @@
 	Element parse(InputStream in, String url) throws HudsonException {
 		try {
 			return getDocumentBuilder().parse(in).getDocumentElement();
+		} catch (OperationCanceledException e) {
+			throw e;
 		} catch (SAXException e) {
 			throw new HudsonException(NLS.bind("Failed to parse response from {0}", url), e);
 		} catch (Exception e) {