From d7a8d67d760a80962821f6951caee5a9c807f5be Mon Sep 17 00:00:00 2001 From: Reinhard Tartler Date: Sun, 13 Nov 2011 09:27:52 +0100 Subject: Imported nxcomp-3.1.0-6.tar.gz Summary: Imported nxcomp-3.1.0-6.tar.gz Keywords: Imported nxcomp-3.1.0-6.tar.gz into Git repository --- nxcomp/Proxy.cpp | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) (limited to 'nxcomp/Proxy.cpp') diff --git a/nxcomp/Proxy.cpp b/nxcomp/Proxy.cpp index 371dfe645..54a5af406 100755 --- a/nxcomp/Proxy.cpp +++ b/nxcomp/Proxy.cpp @@ -3647,32 +3647,20 @@ int Proxy::handlePing() if (diffPing >= (control -> PingTimeout - control -> LatencyTimeout * 5)) { - if (tokens_[token_control].remaining > 0) - { - #if defined(TEST) || defined(INFO) || defined(PING) - *logofs << "Proxy: Sending a new ping at " << strMsTimestamp() - << " with " << tokens_[token_control].remaining - << " tokens and elapsed in " << diffIn << " out " - << diffOut << " ping " << diffPing - << ".\n" << logofs_flush; - #endif - - if (handleFrame(frame_ping) < 0) - { - return -1; - } - - timeouts_.pingTs = nowTs; - } #if defined(TEST) || defined(INFO) || defined(PING) - else + *logofs << "Proxy: Sending a new ping at " << strMsTimestamp() + << " with " << tokens_[token_control].remaining + << " tokens and elapsed in " << diffIn << " out " + << diffOut << " ping " << diffPing + << ".\n" << logofs_flush; + #endif + + if (handleFrame(frame_ping) < 0) { - *logofs << "Proxy: WARNING! Can't send a new ping " - << "with no tokens and elapsed in " << diffIn - << " out " << diffOut << " ping " << diffPing - << ".\n" << logofs_flush; + return -1; } - #endif + + timeouts_.pingTs = nowTs; } #if defined(TEST) || defined(INFO) || defined(PING) else -- cgit v1.2.3