Skip to content

Conversation

@bitmario
Copy link

@bitmario bitmario commented Apr 29, 2019

This PR adds a timeout argument to JSONRPCWallet and JSONRPCDaemon which is applied to all requests, fixing #18. The timeout defaults to None so this change is backwards compatible.

The timeout is passed directly to requests.post so it can be simply a number of seconds or a (connect timeout, read timeout) tuple (see https://3.python-requests.org/user/advanced/#timeouts).

No special exceptions are raised. If needed, the caller will have to handle the Timeout exception from requests, similarly to what currently happens for other types of connection errors.

@dethos
Copy link

dethos commented Apr 29, 2019

@bitmario can you please add this extra feature to the Readme's list of changes?
I would also add the warning there, highlighting that the operation might succeed even if the timeout is triggered.

@bitmario
Copy link
Author

Thanks @dethos, I have added a note to the readme.

Copy link

@lalvarezguillen lalvarezguillen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@lalvarezguillen lalvarezguillen merged commit 015f9aa into python-monero:master Apr 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants