diff --git a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/OkHttpNetworkConnection.kt b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/OkHttpNetworkConnection.kt index 249dfccc4..893e78e9f 100644 --- a/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/OkHttpNetworkConnection.kt +++ b/snowplow-tracker/src/main/java/com/snowplowanalytics/snowplow/network/OkHttpNetworkConnection.kt @@ -361,7 +361,7 @@ class OkHttpNetworkConnection private constructor(builder: OkHttpNetworkConnecti * @return a RequestResult */ private fun requestSender(request: okhttp3.Request): Int { - return try { + try { Logger.v(TAG, "Sending request: %s", request) TrafficStats.setThreadStatsTag(TRAFFIC_STATS_TAG) val resp = client?.newCall(request)?.execute() @@ -369,10 +369,10 @@ class OkHttpNetworkConnection private constructor(builder: OkHttpNetworkConnecti resp.body?.close() return resp.code } - -1 + return -1 } catch (e: IOException) { Logger.e(TAG, "Request sending failed: %s", e.toString()) - -1 + return -1 } }