ping websocket, avoid cloudflare auto disconnect

This commit is contained in:
creeper123123321 2021-02-18 17:00:55 -03:00 committed by GitHub
parent 83fe6f6234
commit 1667bfe2ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,8 @@ class ViaWebApp {
} }
install(WebSockets) { install(WebSockets) {
maxFrameSize = Short.MAX_VALUE.toLong() maxFrameSize = Short.MAX_VALUE.toLong()
pingPeriod = Duration.ofSeconds(60)
timeout = Duration.ofSeconds(15)
} }
routing { routing {
@ -47,4 +49,4 @@ class ViaWebApp {
} }
} }
} }
} }