unoconv / unoserver

MIT License
592 stars 81 forks source link

Add timeout to client #137

Closed lafrech closed 1 month ago

lafrech commented 1 month ago

When server is down, a ConnectionRefusedError ultimately bubbles up.

It would be nice if the convert and compare methods had a timeout argument to handle this gracefully and return a dedicated exception.

regebro commented 1 month ago

I think this should be solved in the next release.

lafrech commented 2 weeks ago

I think this should be solved in the next release.

Did you mean in 3.x?

Because I don't see anything regarding client timeout.

I saw the --conversion-timeout added to the server, but I don't think there's been any change to the client regarding this.

I just tested and got two different errors:

regebro commented 2 weeks ago

No, the bubbling up of a connectionerror is now handled better. That shouldn't be timed out, it's a genuine unrecoverable error.

If the server is down, it's down. You'll get a connection error. The problem before is that you could get it when the server was not down.