withAutomaticReconnect method
HubConnectionBuilder
withAutomaticReconnect({
- IRetryPolicy? reconnectPolicy,
- List<
int> ? retryDelays,
Implementation
HubConnectionBuilder withAutomaticReconnect(
{IRetryPolicy? reconnectPolicy, List<int>? retryDelays}) {
assert(_reconnectPolicy == null);
if (reconnectPolicy == null && retryDelays == null) {
_reconnectPolicy = DefaultRetryPolicy();
} else if (retryDelays != null) {
_reconnectPolicy = DefaultRetryPolicy(retryDelays: retryDelays);
} else {
_reconnectPolicy = reconnectPolicy;
}
return this;
}