Initiating read requests uses an asynchronous callback system where
requests are sent to the printer and then a callback will fire with the
printer's response. If the printer currently has no data to service the
read request then it responds with a 0-byte message. This system lead to
ippusbxd spamming the printer continuously with read requests that came
back with empty responses.
This change introduces exponential backoff so that if an empty response
is received from the printer, ippusbxd will wait for increasingly long
periods before issuing another request. This change significantly
reduces syslog spam, and should result in faster communication with the
printer.
Initiating read requests uses an asynchronous callback system where requests are sent to the printer and then a callback will fire with the printer's response. If the printer currently has no data to service the read request then it responds with a 0-byte message. This system lead to ippusbxd spamming the printer continuously with read requests that came back with empty responses.
This change introduces exponential backoff so that if an empty response is received from the printer, ippusbxd will wait for increasingly long periods before issuing another request. This change significantly reduces syslog spam, and should result in faster communication with the printer.