Attempt ping from front- to back-end several times (#1990). v2.15.145
authorCarl Hetherington <cth@carlh.net>
Sun, 9 May 2021 14:43:24 +0000 (16:43 +0200)
committerCarl Hetherington <cth@carlh.net>
Sun, 9 May 2021 21:15:05 +0000 (23:15 +0200)
commit472959c1357f43e2eb33366c58bed0466474c2b7
treeb4cb1bd7b430107c79cded98c880a8daec96b77e
parent33b14b1c003a19020b3c5f12e639d91140f1388d
Attempt ping from front- to back-end several times (#1990).

On macOS it seems that the backend sometimes is not started very
quickly.  Adding a long timeout to ping does not work, perhaps
because the backend is not listening.

Trying a few times seems to fix it.

With this fix I saw this log:

Sun May  9 23:02:51 2021: dcpomatic_disk_writer e63a485e23 started
Sun May  9 23:02:51 2021: Entering main loop
Sun May  9 23:02:51 2021: Writer receives command: P

from the backend and

Sun May  9 23:02:45 2021: Could not send ping to writer (attempt 1)
Sun May  9 23:02:47 2021: Could not send ping to writer (attempt 2)
Sun May  9 23:02:49 2021: Could not send ping to writer (attempt 3)

from the front-end, suggesting that the first 3 pings went to /dev/null
and the 4th was heard.
src/tools/dcpomatic_disk.cc