debian/bluebinder.service: restart less frequently, but for more times
Sometimes, the HIDL service isn't really ready yet despite the service's
process already running (as detected by bluebinder_wait.sh
), which
leads to bluebinder failling. When this occur, by default systemd will
restart the service after 100 ms up to 5 times, which doesn't help in
many cases as sometimes the HIDL service takes even more than 500 ms to
be ready.
So, just give the HIDL service more time, by restarting service after 1 second up to 10 times, for the total of ~10 seconds. This should be ample time for the HIDL service to initialize, and also reduce burst.
Note that StartLimitIntervalSec
is specified at 20 instead of 10 to
account for time it takes for bluebinder itself to attempt connection.
See systemd.unit(5) and systemd.service(5) for details on how these settings work.
Fixes: #3 (closed)