mirror of
https://git.selfprivacy.org/kherel/selfprivacy.org.app.git
synced 2025-01-23 01:06:44 +00:00
fix: Use graphqlTransportWs to automatically ping server and prevent timeouts
This commit is contained in:
parent
e0232bfa44
commit
7c28f92581
|
@ -100,8 +100,9 @@ abstract class GraphQLApiMap {
|
|||
Future<GraphQLClient> getSubscriptionClient() async {
|
||||
final WebSocketLink webSocketLink = WebSocketLink(
|
||||
'ws://api.$rootAddress/graphql',
|
||||
// Only [GraphQLProtocol.graphqlTransportWs] supports automatic pings, so we don't disconnect when nothing happens.
|
||||
subProtocol: GraphQLProtocol.graphqlTransportWs,
|
||||
config: SocketClientConfig(
|
||||
// TODO: Figure out the keep alive pings, as the app disconnects after 30s of inactivity.
|
||||
autoReconnect: true,
|
||||
initialPayload: _token.isEmpty
|
||||
? null
|
||||
|
|
Loading…
Reference in a new issue