sen-ether-client 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/sen.js +4 -7
- package/package.json +1 -1
package/lib/sen.js
CHANGED
|
@@ -159,17 +159,14 @@ function stateRequestKey(interestId, objectId) {
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
async function waitForSessionBuses(session, timeoutMs) {
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
return buses;
|
|
162
|
+
if (timeoutMs <= 0) {
|
|
163
|
+
return session.listBuses();
|
|
165
164
|
}
|
|
166
|
-
|
|
167
165
|
const deadline = Date.now() + timeoutMs;
|
|
168
|
-
while (
|
|
166
|
+
while (Date.now() < deadline) {
|
|
169
167
|
await wait(Math.min(50, Math.max(1, deadline - Date.now())));
|
|
170
|
-
buses = session.listBuses();
|
|
171
168
|
}
|
|
172
|
-
return
|
|
169
|
+
return session.listBuses();
|
|
173
170
|
}
|
|
174
171
|
|
|
175
172
|
class ChangeBatcher {
|