Skip to content

Commit ca53d20

Browse files
committed
chore: handle waking from device sleep
1 parent d2ed4a9 commit ca53d20

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Coder Desktop/Coder Desktop/State.swift

+4
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ class SecureSession: ObservableObject, Session {
4545
// isn't accessible, so we'll use providerConfiguration, which is over XPC.
4646
proto.providerConfiguration = ["token": sessionToken!]
4747
proto.serverAddress = baseAccessURL!.absoluteString
48+
// We don't currently have a way to refresh the peer state from the server,
49+
// and we might have missed updates while we slept,.
50+
// To avoid showing some weird state on wake, we'll just disconnect on sleep.
51+
proto.disconnectOnSleep = true
4852
return proto
4953
}
5054

0 commit comments

Comments
 (0)