diff --git a/baatolibrary/src/main/java/com/baato/baatolibrary/services/BaatoPlace.java b/baatolibrary/src/main/java/com/baato/baatolibrary/services/BaatoPlace.java index fd5df3d..018d969 100644 --- a/baatolibrary/src/main/java/com/baato/baatolibrary/services/BaatoPlace.java +++ b/baatolibrary/src/main/java/com/baato/baatolibrary/services/BaatoPlace.java @@ -1,6 +1,8 @@ package com.baato.baatolibrary.services; import android.content.Context; +import android.util.Log; +import android.widget.Toast; import androidx.annotation.NonNull; @@ -93,6 +95,7 @@ public void onResponse(Call call, Response r else { try { baatoPlaceListener.onFailed(new Throwable(response.errorBody().string())); + cancelRequest(); } catch (IOException e) { e.printStackTrace(); } diff --git a/baatolibrary/src/main/java/com/baato/baatolibrary/services/BaatoReverse.java b/baatolibrary/src/main/java/com/baato/baatolibrary/services/BaatoReverse.java index 6151e02..39e5d91 100644 --- a/baatolibrary/src/main/java/com/baato/baatolibrary/services/BaatoReverse.java +++ b/baatolibrary/src/main/java/com/baato/baatolibrary/services/BaatoReverse.java @@ -107,7 +107,7 @@ public void onResponse(Call call, Response r else { try { baatoReverseRequestListener.onFailed(new Throwable(response.errorBody().string())); - Log.d(TAG, "onResponse: "); + cancelRequest(); } catch (Exception e) { e.printStackTrace(); } diff --git a/baatolibrary/src/main/java/com/baato/baatolibrary/services/BaatoRouting.java b/baatolibrary/src/main/java/com/baato/baatolibrary/services/BaatoRouting.java index db40b9c..e142e33 100644 --- a/baatolibrary/src/main/java/com/baato/baatolibrary/services/BaatoRouting.java +++ b/baatolibrary/src/main/java/com/baato/baatolibrary/services/BaatoRouting.java @@ -135,6 +135,7 @@ public void onResponse(Call call, Response call, Response else { try { baatoSearchRequestListener.onFailed(new Throwable(response.errorBody().string())); + cancelRequest(); } catch (IOException e) { e.printStackTrace(); }