mirror of
https://github.com/slhaf/Partner.git
synced 2026-05-12 16:53:04 +08:00
fix(partnerctl-init): use numeric default for heartbeat interval prompt
This commit is contained in:
@@ -20,7 +20,7 @@ fun configureWebSocketGateway(prompt: Prompt): GatewayConfig.ChannelConfig {
|
|||||||
if (intValue !in 1..65565) "WebSocket port should be between 1 and 65565" else null
|
if (intValue !in 1..65565) "WebSocket port should be between 1 and 65565" else null
|
||||||
}.toInt()
|
}.toInt()
|
||||||
|
|
||||||
val heartbeatInterval = prompt.ask("heartbeat interval", "10_000L") {
|
val heartbeatInterval = prompt.ask("heartbeat interval", "10000") {
|
||||||
it.toLongOrNull() ?: return@ask "Heartbeat interval only accepts long value"
|
it.toLongOrNull() ?: return@ask "Heartbeat interval only accepts long value"
|
||||||
return@ask null
|
return@ask null
|
||||||
}.toLong()
|
}.toLong()
|
||||||
|
|||||||
Reference in New Issue
Block a user