From 19c567cef37d5ba86e0360845b515ab181a507a0 Mon Sep 17 00:00:00 2001 From: "roberto@maverick64" Date: Thu, 30 Jun 2011 13:00:14 +0200 Subject: [PATCH] fixed fastrouter nodes stats --- plugins/fastrouter/fastrouter.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/fastrouter/fastrouter.c b/plugins/fastrouter/fastrouter.c index 9590eddc..2cddd186 100644 --- a/plugins/fastrouter/fastrouter.c +++ b/plugins/fastrouter/fastrouter.c @@ -513,7 +513,8 @@ void fastrouter_loop() { iov[1].iov_len = fr_session->uh.pktsize; // increment node requests counter - fr_session->un->requests++; + if (fr_session->un) + fr_session->un->requests++; // fd passing: PERFORMANCE EXTREME BOOST !!! if (fr_session->pass_fd && !uwsgi.no_fd_passing) { @@ -572,7 +573,8 @@ void fastrouter_loop() { } // update transfer statistics - fr_session->un->transferred += len; + if (fr_session->un) + fr_session->un->transferred += len; } // body from client else if (interesting_fd == fr_session->fd) {