Add missing synchronized

This commit is contained in:
Benoit Marty 2021-03-22 18:26:29 +01:00
parent d85d44bf4b
commit f106176752

View file

@ -44,6 +44,7 @@ internal class ApiInterceptor @Inject constructor() : Interceptor {
val response = chain.proceed(request)
synchronized(apiResponseListenersMap) {
findApiPath(path, method)?.let { apiPath ->
response.peekBody(Long.MAX_VALUE).string().let { networkResponse ->
apiResponseListenersMap[apiPath]?.forEach { listener ->
@ -53,6 +54,7 @@ internal class ApiInterceptor @Inject constructor() : Interceptor {
}
}
}
}
return response
}