Fix: SimpleClient.call does not raise TimeoutError on timeout#1501
Conversation
|
TimoutError is a subclass of SocketIOError. Please for the future, if you are going to submit fixes to this project (or any project of mine, really), include unit tests that a) demonstrate that the bug occurs without the fix and b) pass when the fix is added. |
|
Sure thing. I didn't see a As for the PR itself, perhaps I didn't make the issue clear. The docstring says that this function will raise TimeoutError if it times out. Current behaviour however is to catch TimeoutError and ignore it (because, as you say, it is a subclass of SocketIOError). However, if it were to behave as the docstring suggests it would reraise any TimeoutError. Hope this makes some sense! |
|
Okay, sorry, I see the problem now. So what this PR is missing is a) similar fix on the async side, and b) unit tests. Is this something you can do? |
|
Yes, I'd be happy to. |
9effe4a to
354c2e2
Compare
|
Ok, added tests which fail without the changes and pass with them. e: will fix lint error when I get the chance in a couple hours. The other failure seems to be due to a cov rate limit. |
354c2e2 to
353a8b9
Compare
|
Thanks! |
Heya, back again. Pretty sure this one is a bug. If the underlying
calltimes out, it leads to an infinite loop since theTimeoutErroris caught in theexcept SocketIOErrorblock and ignored.I would think that we want to reraise that
TimeoutError. (And maybe all otherSocketIOErrors too?)