mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-18 21:10:02 +03:00
Add missing synchronized
This commit is contained in:
parent
d85d44bf4b
commit
f106176752
1 changed files with 7 additions and 5 deletions
|
@ -44,6 +44,7 @@ internal class ApiInterceptor @Inject constructor() : Interceptor {
|
||||||
|
|
||||||
val response = chain.proceed(request)
|
val response = chain.proceed(request)
|
||||||
|
|
||||||
|
synchronized(apiResponseListenersMap) {
|
||||||
findApiPath(path, method)?.let { apiPath ->
|
findApiPath(path, method)?.let { apiPath ->
|
||||||
response.peekBody(Long.MAX_VALUE).string().let { networkResponse ->
|
response.peekBody(Long.MAX_VALUE).string().let { networkResponse ->
|
||||||
apiResponseListenersMap[apiPath]?.forEach { listener ->
|
apiResponseListenersMap[apiPath]?.forEach { listener ->
|
||||||
|
@ -53,6 +54,7 @@ internal class ApiInterceptor @Inject constructor() : Interceptor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return response
|
return response
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue