fix: configure postgres idle timeout and connection recycling for Railway
Railway proxy closes idle DB connections after ~60s, causing CONNECTION_CLOSED errors on stale sockets. Set idle_timeout=20s and max_lifetime=5m so postgres-js recycles connections before they die. Also fix sendCommand to fall back to persistent device ID on reconnect.
This commit is contained in:
@@ -7,6 +7,7 @@ import com.thisux.droidclaw.model.DeviceInfoMsg
|
||||
import com.thisux.droidclaw.model.ServerMessage
|
||||
import io.ktor.client.HttpClient
|
||||
import io.ktor.client.engine.cio.CIO
|
||||
import io.ktor.client.engine.cio.endpoint
|
||||
import io.ktor.client.plugins.websocket.WebSockets
|
||||
import io.ktor.client.plugins.websocket.webSocket
|
||||
import io.ktor.websocket.Frame
|
||||
|
||||
Reference in New Issue
Block a user