File tree Expand file tree Collapse file tree 3 files changed +7
-4
lines changed
session/libsignal/utilities
thoughtcrime/securesms/groups Expand file tree Collapse file tree 3 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -162,8 +162,8 @@ object HTTP {
162162 private val httpCallSemaphore = Semaphore (20 )
163163
164164 private suspend fun Call.await (): Response {
165- return withContext( Dispatchers . IO ) {
166- httpCallSemaphore.withPermit {
165+ return httpCallSemaphore.withPermit {
166+ withContext( Dispatchers . IO ) {
167167 execute()
168168 }
169169 }
Original file line number Diff line number Diff line change @@ -226,6 +226,8 @@ class GroupPoller @AssistedInject constructor(
226226 throw NonRetryableException (" Group has been kicked" )
227227 }
228228
229+ Log .v(TAG , " Start polling group($groupId ) message snode = ${snode.ip} " )
230+
229231 val adminKey = group.adminKey
230232
231233 val pollingTasks = mutableListOf<Pair <String , Deferred <* >>>()
@@ -270,7 +272,6 @@ class GroupPoller @AssistedInject constructor(
270272 Namespace .GROUP_MESSAGES ()
271273 ).orEmpty()
272274
273- Log .v(TAG , " Retrieving group($groupId ) message since lastHash = $lastHash , snode = ${snode.publicKeySet} " )
274275
275276 SnodeAPI .sendBatchRequest(
276277 snode = snode,
@@ -356,6 +357,8 @@ class GroupPoller @AssistedInject constructor(
356357 }
357358 }
358359
360+ Log .d(TAG , " Group($groupId ) polling completed, success = ${result.isSuccess} " )
361+
359362 if (result.isFailure) {
360363 val error = result.exceptionOrNull()
361364 Log .e(TAG , " Error polling group" , error)
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ class GroupPollerManager @Inject constructor(
5858 pollFactory : GroupPoller .Factory ,
5959 @param:ManagerScope private val managerScope : CoroutineScope ,
6060) : OnAppStartupComponent {
61- private val groupPollerSemaphore = Semaphore (5 )
61+ private val groupPollerSemaphore = Semaphore (20 )
6262
6363 @Suppress(" OPT_IN_USAGE" )
6464 private val groupPollers: StateFlow <Map <AccountId , GroupPollerHandle >> =
You can’t perform that action at this time.
0 commit comments