diff --git a/app/build.gradle b/app/build.gradle index 343b2fdf..2593af1f 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -17,8 +17,8 @@ android { applicationId "rectangledbmi.com.pittsburghrealtimetracker" minSdkVersion 16 targetSdkVersion 23 - versionCode 75 - versionName "7.0.2" + versionCode 76 + versionName "7.0.3" } lintOptions { warning 'InvalidPackage' diff --git a/app/src/main/java/rectangledbmi/com/pittsburghrealtimetracker/BusMapFragment.java b/app/src/main/java/rectangledbmi/com/pittsburghrealtimetracker/BusMapFragment.java index d0fe6950..1b620ddb 100644 --- a/app/src/main/java/rectangledbmi/com/pittsburghrealtimetracker/BusMapFragment.java +++ b/app/src/main/java/rectangledbmi/com/pittsburghrealtimetracker/BusMapFragment.java @@ -564,8 +564,9 @@ public Observable call(RouteSelection routeSelection) { }).map(VehicleResponse::getBustimeResponse) .retryWhen(attempt -> attempt .flatMap(throwable -> { + Timber.d(throwable, "Catching error"); // theoretically, this should only resubscribe when internet is back - if (throwable instanceof IOException){ + if (throwable instanceof IOException && !(throwable instanceof SocketTimeoutException)){ if (busListInteraction != null) { busListInteraction.showToast(getString(R.string.disconnected_internet), Toast.LENGTH_SHORT); } @@ -606,7 +607,7 @@ public Observable call(RouteSelection routeSelection) { // otherwise, just run normal onError Timber.d("Not retrying since something should be wrong on " + "Port Authority's end."); - return null; + return Observable.error(throwable); })) .share() .subscribeOn(Schedulers.computation()) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 8ed28c42..e9f29189 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -357,7 +357,7 @@ Port Authority server unavailable. Please try again after midnight. Cannot connect to internet. Please check your data. Cannot translate information from Port Authority. - The Port Authority website seems to be down. + Port Authority server is down. Please try again later. An unexpected error occurred. Please contact the developers.