Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout value for sync request #131

Closed
slipeer opened this issue May 18, 2017 · 3 comments
Closed

Timeout value for sync request #131

slipeer opened this issue May 18, 2017 · 3 comments

Comments

@slipeer
Copy link

slipeer commented May 18, 2017

According Requests doc it accept timeout parameter in seconds.
But in api.py#L78 to this parameter passed huge value 30000 sec = 8.3 hours from api.py#L63
I think line api.py#L78 must be like: "timeout": timeout_ms/1000.0

@lugino-emeritus
Copy link

lugino-emeritus commented Oct 16, 2017

AFIAK the timeout in api.py#L78 has nothing to do with the timeout of requests. This timeout is only passed to the matrix server. It is the timeout until the matrix server will send an answer.

See here and here.

@ghost
Copy link

ghost commented Mar 23, 2018

This number is only passed onto the server. It is the maximum amount of time the server will let the connection hang, if no events arrive. In a word, we're long-polling here. The value should indeed be in milliseconds. See https://matrix.org/docs/spec/client_server/r0.3.0.html#get-matrix-client-r0-sync

I think this issue can be closed.

@non-Jedi
Copy link
Collaborator

Very good. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants