Open RubenKelevra opened 4 years ago
what is the expected behaviour? returning EAGAIN / EWOULDBLOCK?
@RubenKelevra what is your version/commit of ipfs-api-mount? I've added timeout handling in 8b0ef38d12dc687deb4faa6762364431d679ba95, which is not yet released to pypi.
@RubenKelevra what is your version/commit of ipfs-api-mount? I've added timeout handling in 8b0ef38, which is not yet released to pypi.
I've used the released version: e316ff277ecebe73138fd98950a4ea903677ba06
what is the expected behaviour? returning EAGAIN / EWOULDBLOCK?
I don't know. It just felt too short until this happened. :)
Ok, I feel this is already fixed but I'm not 100% sure. I'll add some tests for simulated timeouts and see whats going on.
as mentioned in https://github.com/SupraSummus/ipfs-api-mount/issues/33#issuecomment-658859500 returning EAGAIN is risky, because it may be hidden from upper layer code. Lower level will retry the request over and over again.
I don't like the idea of returning EIO, because timeout is not an input-output error.
Good candidate may be implementing configurable timeout and returning ETIMEDOUT.
Currently, socket timeouts are not properly handled (exception while handling an exception).