diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-05-10 15:12:23 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-05-10 23:35:53 +0200 |
| commit | 1484f4e3642e3ddcb10515eb0f32b00370968da3 (patch) | |
| tree | d22fa0fa02f13ddaae3f567a44861c4832b9faf9 /src/tools/dcpomatic_disk.cc | |
| parent | 85f38d1d20f291d8cf453edb2d19afa06bdf2dde (diff) | |
Open a dialogue if pinging the back-end fails on macOS.v2.15.146
At least this means the user will get another go without losing
their setup. My only theory at this point is that sometimes the
backend takes a crazy amount of time to start up because of some
SIP / gatekeeper type nonsense (#1990).
Diffstat (limited to 'src/tools/dcpomatic_disk.cc')
| -rw-r--r-- | src/tools/dcpomatic_disk.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/tools/dcpomatic_disk.cc b/src/tools/dcpomatic_disk.cc index 3daffb72d..67705ffcb 100644 --- a/src/tools/dcpomatic_disk.cc +++ b/src/tools/dcpomatic_disk.cc @@ -250,8 +250,8 @@ private: DCPOMATIC_ASSERT (static_cast<bool>(_dcp_path)); auto ping = [this](int attempt) { - if (_nanomsg.send(DISK_WRITER_PING "\n", 2000)) { - auto reply = _nanomsg.receive (2000); + if (_nanomsg.send(DISK_WRITER_PING "\n", 1000)) { + auto reply = _nanomsg.receive (1000); if (reply && *reply == DISK_WRITER_PONG) { return true; } else if (reply) { @@ -262,6 +262,7 @@ private: } else { LOG_DISK("Could not send ping to writer (attempt %1)", attempt); } + dcpomatic_sleep_seconds (1); return false; }; @@ -274,7 +275,7 @@ private: } if (!have_writer) { -#ifdef DCPOMATIC_WINDOWS +#if defined(DCPOMATIC_WINDOWS) auto m = new MessageDialog ( this, _("DCP-o-matic Disk Writer"), @@ -283,6 +284,15 @@ private: m->ShowModal (); m->Destroy (); return; +#elif defined(DCPOMATIC_OSX) + auto m = new MessageDialog ( + this, + _("DCP-o-matic Disk Writer"), + _("Did you install the DCP-o-matic Disk Writer.pkg from the .dmg? Please check and try again.") + ); + m->ShowModal (); + m->Destroy (); + return; #else LOG_DISK_NC ("Failed to ping writer"); throw CommunicationFailedError (); |
