diff --git a/CHANGELOG.md b/CHANGELOG.md index 0939ec14..638ec4d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### Version 1.0.36 Tag: v1.0.36 (2020-06-14) + * fix 'cannot make a new request because the previous response (@lishoujun) + * Various translations + ### Version 1.0.35 Tag: v1.0.35 (2020-06-01) * Gradle und Lib updates (Android Studio 4) (@jmgfr) * Friendly name for downloaded files (@jmgfr) diff --git a/app/build.gradle b/app/build.gradle index 5062d0a6..3844e9cd 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -6,8 +6,8 @@ android { applicationId "net.schueller.peertube" minSdkVersion 21 targetSdkVersion 28 - versionCode 1035 - versionName "1.0.35" + versionCode 1036 + versionName "1.0.36" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" ext { libVersions = [ diff --git a/app/src/main/java/net/schueller/peertube/network/AuthorizationInterceptor.java b/app/src/main/java/net/schueller/peertube/network/AuthorizationInterceptor.java index 37786c7f..37ba18f4 100644 --- a/app/src/main/java/net/schueller/peertube/network/AuthorizationInterceptor.java +++ b/app/src/main/java/net/schueller/peertube/network/AuthorizationInterceptor.java @@ -37,8 +37,7 @@ public AuthorizationInterceptor() { public Response intercept(Chain chain) throws IOException { Session session = Session.getInstance(); - - Response mainResponse = chain.proceed(chain.request()); + Response mainResponse; Request mainRequest = chain.request(); if (session.isLoggedIn()) { @@ -49,7 +48,8 @@ public Response intercept(Chain chain) throws IOException { // Log.v("Authorization", "Intercept: " + session.getToken()); // build request - mainResponse = chain.proceed(builder.build()); + Request req = builder.build(); + mainResponse = chain.proceed(req); // logout on auth error if (mainResponse.code() == 401 || mainResponse.code() == 403) { @@ -57,6 +57,8 @@ public Response intercept(Chain chain) throws IOException { Log.v("Authorization", "Intercept: Logout forced"); } + }else{ + mainResponse = chain.proceed(chain.request()); } return mainResponse;