[cups-devel] httpReconnect() does not recover from server down/up

Jacob Marble jacobmarble at google.com
Tue Oct 28 08:22:29 PDT 2014


Turns out that I was calling cupsLastError() when the most recent CUPS call
(httpReconnect() in this case) did not return an error.

So, thanks for listening.

Jacob

On Fri, Oct 24, 2014 at 1:20 PM, Jacob Marble <jacobmarble at google.com>
wrote:

> Ubuntu 14.04.1 LTS
> CUPS 1.7.2
>
> I'm writing a cloud print proxy that maintains a long-term (hours)
> connection to the CUPS server at localhost:631. Before every CUPS API call,
> I call httpReconnect() to make sure the connection is working.
>
> To test:
> - start the CUPS server
> - start the proxy
> - let the proxy call httpReconnect() - success
> - stop the CUPS server
> - let the proxy call httpReconnect() - fail
> - the proxy handles the error, continues running
> - restart the CUPS server
> - let the proxy call httpReconnect() - fail
>
> I expect httpReconnect() to succeed after the CUPS server comes back up.
> Am I wrong?
>
> Jacob
>



More information about the cups mailing list