Index: sdk/lib/_internal/pub/lib/src/http.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/http.dart b/sdk/lib/_internal/pub/lib/src/http.dart |
index 4fe118eb25c238e8df4dc24be2c8b0757e6f8982..12ee4e264623b0f98302a2c9f1a4aaec1ae99682 100644 |
--- a/sdk/lib/_internal/pub/lib/src/http.dart |
+++ b/sdk/lib/_internal/pub/lib/src/http.dart |
@@ -107,6 +107,9 @@ class _PubHttpClient extends http.BaseClient { |
throw new PubHttpException(response); |
}); |
}).catchError((error, stackTrace) { |
+ // Work around issue 23008. |
+ if (stackTrace == null) stackTrace = new Chain.current(); |
+ |
if (error is SocketException && |
error.osError != null) { |
if (error.osError.errorCode == 8 || |