Flutter Signalr_core longpolling connection get closing automatically?

Viewed 78

TransportType websockets is not working on Flutter web so i am using longpolling for web,but its connection gets closing automatically ,how to stop closing connection?

HubConnectionBuilder()
    .withUrl(url, HttpConnectionOptions(client: httpClient,
    accessTokenFactory: getToken, transport: kIsWeb ? HttpTransportType.longPolling : HttpTransportType.webSockets))
    .build();
0 Answers
Related