We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2852e7a commit d604ad8Copy full SHA for d604ad8
uploadservice/src/main/java/net/gotev/uploadservice/network/hurl/HurlStackRequest.kt
@@ -36,6 +36,8 @@ class HurlStackRequest(
36
}
37
38
init {
39
+ if (networkAvailable.not()) throw IOException()
40
+
41
UploadServiceLogger.debug(javaClass.simpleName, uploadId) {
42
"creating new HttpURLConnection (uuid: $uuid)"
43
@@ -140,4 +142,8 @@ class HurlStackRequest(
140
142
} catch (ignored: Throwable) {
141
143
144
145
146
+ companion object {
147
+ var networkAvailable = false
148
+ }
149
0 commit comments