Commit 134c3d5b authored by Steven Murray's avatar Steven Murray
Browse files

Added castor::tape::aggregator::CLIENTPINGTIMEOUT instead of just pinging every second

parent 0c0e2757
......@@ -190,10 +190,13 @@ void castor::tape::aggregator::BridgeProtocolEngine::processRtcpdSocks()
throw(ex);
}
// Ping the client if it is readtp, writetp or dumptp
if(m_volume.clientType() == tapegateway::READ_TP ||
// Ping the client if the ping timeout has been reached and the client is
// readtp, writetp or dumptp
if(
(nbOneSecondTimeouts % CLIENTPINGTIMEOUT == 0) &&
(m_volume.clientType() == tapegateway::READ_TP ||
m_volume.clientType() == tapegateway::WRITE_TP ||
m_volume.clientType() == tapegateway::DUMP_TP) {
m_volume.clientType() == tapegateway::DUMP_TP)) {
try {
ClientTxRx::ping(m_cuuid, m_jobRequest.volReqId,
......
......@@ -34,6 +34,7 @@ namespace castor {
namespace tape {
namespace aggregator {
const int CLIENTPINGTIMEOUT = 5;
const size_t HDRBUFSIZ = 3 * sizeof(uint32_t);
const int MAXDRIVES = 4;
const int MAXINITMIGFILES = 2;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment