Comparing version 0.0.4 to 0.0.5
{ | ||
"name": "ponsqb", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "ponsqb js client", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -78,3 +78,3 @@ export default async function(connection, bridge, attributes) { | ||
async function poll(options = {}) { | ||
function poll(options = {}) { | ||
const interval = options.interval || 1 | ||
@@ -84,2 +84,4 @@ const timeout = options.timeout || 10 | ||
const eachPoll = options.eachPoll || () => {} | ||
while (!finishedAt()) { | ||
@@ -90,2 +92,3 @@ if (secondsSince(started) > timeout) { | ||
await refresh() | ||
eachPoll() | ||
await sleep(interval) | ||
@@ -92,0 +95,0 @@ } |
6775
285