summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@yahoo.com>2017-08-10 00:28:53 +0200
committerJoel Klinghed <the_jk@yahoo.com>2017-08-10 00:28:53 +0200
commit3b2878883540874a45a68afe39aa8ce6920650f7 (patch)
treea59fbbfe2af3e5f93ed72817a87f9452dc86ed4c /src
parent1cf5a0c07ab657adb938191ab3be788763885994 (diff)
Fix crash when proxy is launched in daemon mode
Diffstat (limited to 'src')
-rw-r--r--src/proxy.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/proxy.cc b/src/proxy.cc
index 97180ca..b1e5940 100644
--- a/src/proxy.cc
+++ b/src/proxy.cc
@@ -442,6 +442,10 @@ size_t get_size(Config* config, Logger* logger, std::string const& name,
void ProxyImpl::setup() {
monitor_send_proxied_ = !config_->get("monitor_proxy_request", false);
+ if (!logger_) {
+ priv_logger_.reset(Logger::create_syslog("tp"));
+ logger_ = priv_logger_.get();
+ }
clients_.resize(get_size(config_, logger_, "max_clients", 1024));
monitors_.resize(get_size(config_, logger_, "max_monitors", 2));
mitm_.reset(Mitm::create(logger_, config_, cwd_));
@@ -1842,10 +1846,6 @@ void ProxyImpl::fatal_error() {
bool ProxyImpl::run() {
good_ = true;
- if (!logger_) {
- priv_logger_.reset(Logger::create_syslog("tp"));
- logger_ = priv_logger_.get();
- }
{
struct sigaction action;
memset(&action, 0, sizeof(action));