Commit e9cb71b
fix(pubsub): use remaining timeout in listen() to prevent cumulative timeout drift
- Track remaining timeout across loop iterations instead of passing
the full timeout each time. This ensures listen(timeout=N) returns
within approximately N seconds total, not N seconds per iteration.
- Addresses cursor[bot] review comments about full timeout being
passed each loop iteration.1 parent 91b3cd2 commit e9cb71b
2 files changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1440 | 1440 | | |
1441 | 1441 | | |
1442 | 1442 | | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
1443 | 1446 | | |
1444 | 1447 | | |
1445 | | - | |
| 1448 | + | |
1446 | 1449 | | |
1447 | 1450 | | |
1448 | 1451 | | |
1449 | 1452 | | |
1450 | 1453 | | |
1451 | 1454 | | |
1452 | 1455 | | |
| 1456 | + | |
1453 | 1457 | | |
1454 | 1458 | | |
1455 | 1459 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1449 | 1449 | | |
1450 | 1450 | | |
1451 | 1451 | | |
| 1452 | + | |
| 1453 | + | |
| 1454 | + | |
1452 | 1455 | | |
1453 | 1456 | | |
1454 | | - | |
| 1457 | + | |
1455 | 1458 | | |
1456 | 1459 | | |
1457 | 1460 | | |
1458 | 1461 | | |
1459 | 1462 | | |
1460 | 1463 | | |
1461 | 1464 | | |
| 1465 | + | |
1462 | 1466 | | |
1463 | 1467 | | |
1464 | 1468 | | |
| |||
0 commit comments