In AgentServer.java `s.setSoTimeout((int)(KeepAlive.READ_TIMEOUT * timeoutFactor));` is scaling the timeout using `timeoutFactor`. However, when sending `KEEPALIVE` messages, the timeout is not scaled using the timeout factor. Personally, it seems strange to use the timeout factor for this use case, but if we use it, we should use it for both parts.
I think the best fix is to remove timeoutFactor in three places in Agent.java and AgentServer.java when setting socket timeout. Otherwise, the socket might time out if you use a timeoutFactor that is less than ~0.5.
I think the best fix is to remove timeoutFactor in three places in Agent.java and AgentServer.java when setting socket timeout. Otherwise, the socket might time out if you use a timeoutFactor that is less than ~0.5.