Commit ad10e79
committed
Fix false positive stream ready timeout warning (#515)
The timeout task was logging a warning even when cancelled (streams signaled ready in time). The `try?` swallowed the `CancellationError` but then continued to log the warning.
Now uses `do/catch` to only log when the sleep actually completes (true timeout), not when cancelled.
**Before:** Every app launch logged 5+ "Stream ready timeout - proceeding anyway" warnings even though streams were working fine.
**After:** Warning only appears if streams genuinely fail to signal ready within 10 seconds.
<!-- Macroscope's pull request summary starts here -->
<!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. -->
<!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. -->
> [!NOTE]
> ### Suppress false stream-ready warnings by gating the 10‑second timeout task in `ConvosCore.Syncing.SyncingManager`
> Wrap the stream readiness timeout task in `do/try/catch` so `Task.sleep(10s)` cancellation is swallowed and `Log.warning` plus finishing of `messageStreamReadyContinuation` and `conversationStreamReadyContinuation` only occur after an actual timeout in [SyncingManager.swift](https://github.com/xmtplabs/convos-ios/pull/515/files#diff-ba2362cf646b78283a1af17654ea8d2c18f6b1cb686a78e7761e10f1b0328101).
>
> #### 📍Where to Start
> Start at the timeout task closure inside `SyncingManager`’s stream readiness logic in [SyncingManager.swift](https://github.com/xmtplabs/convos-ios/pull/515/files#diff-ba2362cf646b78283a1af17654ea8d2c18f6b1cb686a78e7761e10f1b0328101).
>
> <!-- Macroscope's review summary starts here -->
>
> <sup><a href="https://app.macroscope.com">Macroscope</a> summarized 0fdcf2e.</sup>
> <!-- Macroscope's review summary ends here -->
>
<!-- macroscope-ui-refresh -->
<!-- Macroscope's pull request summary ends here -->1 parent 9b7e54c commit ad10e79
1 file changed
Lines changed: 9 additions & 5 deletions
Lines changed: 9 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
451 | 455 | | |
452 | 456 | | |
453 | 457 | | |
| |||
0 commit comments