Source
void onDisconnected() { if (!_connected) return; _connected = false; var newRequests = new Map<int, Request>(); newRequests[0] = _subscription; _requests.forEach((n, req) { if (req.rid <= lastRid && req.updater is! ListController) { req._close(DSError.DISCONNECTED); } else { newRequests[req.rid] = req; req.updater.onDisconnect(); } }); _requests = newRequests; }