Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.

Bugfix/reconnect #4

Merged
merged 2 commits into from Jun 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/ddp_client.dart
Expand Up @@ -153,7 +153,7 @@ class DdpClient implements ConnectionNotifier, StatusNotifier {
Message.method(call.id, call.serviceMethod, call.args).toJson()));
this._subs.values.forEach((call) => this
.send(Message.sub(call.id, call.serviceMethod, call.args).toJson()));
}).catchError(() {
}).catchError((error) {
this.close();
this._reconnectLater();
});
Expand Down Expand Up @@ -353,7 +353,7 @@ class DdpClient implements ConnectionNotifier, StatusNotifier {
this._collections.values.forEach((c) => c._init());
this._version = '1';
this._session = msg['session'] as String;
this._pingTimer = Timer(this.heartbeatInterval, () {
this._pingTimer = Timer.periodic(this.heartbeatInterval, (Timer timer) {
this.ping();
});
this._connectionListener.forEach((l) => l());
Expand Down