public NettyServerBuilder keepAliveTimeout ( long keepAliveTimeout , TimeUnit timeUnit ) { checkArgument ( keepAliveTimeout > 0L , "keepalive timeout must be positive" ) ; keepAliveTimeoutInNanos = timeUnit . toNanos ( keepAliveTimeout ) ; keepAliveTimeoutInNanos = KeepAliveManager . clampKeepAliveTimeoutInNanos ( keepAliveTimeoutInNanos ) ; if ( keepAliveTimeoutInNanos < MIN_KEEPALIVE_TIMEOUT_NANO ) { // Bump keepalive timeout. keepAliveTimeoutInNanos = MIN_KEEPALIVE_TIMEOUT_NANO ; } return this ; }
Sets a custom keepalive timeout the timeout for keepalive ping requests . An unreasonably small value might be increased .