matrix-org / matrix-org/matrix-js-sdk
Can't change duration of timeot using 'pollTimeout'
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.2k
- Forks
- 704
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 40
Description
When I try increase timeout limit by adding option `pollTimeout` in `startClient` with 200 000 for example, it doesn't change anything. Still get the same error with the same timeout 80 000:
```
/sync error ORG.MATRIX.JSSDK_TIMEOUT: Locally timed out waiting for a response
{ [ORG.MATRIX.JSSDK_TIMEOUT: Locally timed out waiting for a response]
errcode: 'ORG.MATRIX.JSSDK_TIMEOUT',
name: 'ORG.MATRIX.JSSDK_TIMEOUT',
message: 'Locally timed out waiting for a response',
data:
{ error: 'Locally timed out waiting for a response',
errcode: 'ORG.MATRIX.JSSDK_TIMEOUT',
timeout: 80000 } }
```
As I see, it happens because of `SyncApi.prototype._getSyncParams` which always sets pollTimeout to 0. Is there any way to change it?
Another way is using something like [this](https://github.com/matrix-org/matrix-js-sdk/pull/390/commits/4bff56e5c965a68fb3347f90d43a83156967a1ec).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at SyncApi.prototype._getSyncParams and trace how startClient passes pollTimeout into the sync request. Reproduce the issue with pollTimeout set to 200000, then verify that the resulting timeout data reflects the configured value rather than 80000; the linked historical change may provide useful context.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100