X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fencode_server.cc;h=7bef82b2658c6b0b0e973b70b2e778593a7ed834;hb=160a401d16e3962b10f3105e00992936a8188424;hp=acb0be1c372b059f7bc87001819510cd4320f150;hpb=c6bc60fbeba7a61697cc0cd0045bc4610eb15b9e;p=dcpomatic.git diff --git a/src/lib/encode_server.cc b/src/lib/encode_server.cc index acb0be1c3..7bef82b26 100644 --- a/src/lib/encode_server.cc +++ b/src/lib/encode_server.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2012-2015 Carl Hetherington + Copyright (C) 2012-2018 Carl Hetherington This file is part of DCP-o-matic. @@ -34,6 +34,7 @@ #include "compose.hpp" #include "log.h" #include "encoded_log_entry.h" +#include "version.h" #include #include #include @@ -94,8 +95,9 @@ EncodeServer::~EncodeServer () delete i; } - _broadcast.socket->close (); - delete _broadcast.socket; + if (_broadcast.socket) { + _broadcast.socket->close (); + } _broadcast.io_service.stop (); if (_broadcast.thread) { /* Ideally this would be a DCPOMATIC_ASSERT(_broadcast.thread->joinable()) but we @@ -221,7 +223,7 @@ EncodeServer::worker_thread () void EncodeServer::run () { - LOG_GENERAL ("Server starting with %1 threads", _num_threads); + LOG_GENERAL ("Server %1 (%2) starting with %3 threads", dcpomatic_version, dcpomatic_git_commit, _num_threads); if (_verbose) { cout << "DCP-o-matic server starting with " << _num_threads << " threads.\n"; }