}
// relaunch the agent
if (tcpSlaveAgentListener == null) {
if (slaveAgentPort != -1) {
tcpSlaveAgentListener = new TcpSlaveAgentListener(slaveAgentPort);
}
} else {
if (tcpSlaveAgentListener.configuredPort != slaveAgentPort) {
tcpSlaveAgentListener.shutdown();
tcpSlaveAgentListener = null;
if (slaveAgentPort != -1) {
tcpSlaveAgentListener = new TcpSlaveAgentListener(slaveAgentPort);
}
}
}
}