Commit 53ee02ec04088370e3ea743c0440a3c790b1fc64
use new mutant/dict onListen api for Network polling
mix irving committed on 1/11/2017, 4:10:04 AMParent: 0a50ea2f8ea043de9dac604adc0602cd504b2f25
Files changed
modules_extra/network.js | changed |
package.json | changed |
modules_extra/network.js | ||
---|---|---|
@@ -205,20 +205,15 @@ | ||
205 | 205 … | |
206 | 206 … | function obs_gossip_peers (api) { |
207 | 207 … | var timer = null |
208 | 208 … | var state = Dict({}, { |
209 | - // | |
210 | - // TODO - get this api implemented in mutantDict | |
211 | - // | |
212 | - // onListen: () => { | |
213 | - // timer = setInterval(refresh, 5e3) | |
214 | - // }, | |
215 | - // onUnlisten: () => { | |
216 | - // clearInterval(timer) | |
217 | - // } | |
209 … | + onListen: () => { | |
210 … | + timer = setInterval(refresh, 5e3) | |
211 … | + }, | |
212 … | + onUnlisten: () => { | |
213 … | + clearInterval(timer) | |
214 … | + } | |
218 | 215 … | }) |
219 | - // TODO - remove this line | |
220 | - setInterval(refresh, 5e3) | |
221 | 216 … | |
222 | 217 … | refresh() |
223 | 218 … | |
224 | 219 … | return toCollection.values(state) |
package.json | ||
---|---|---|
@@ -7,9 +7,9 @@ | ||
7 | 7 … | "type": "git", |
8 | 8 … | "url": "git://github.com/dominictarr/patchbay.git" |
9 | 9 … | }, |
10 | 10 … | "dependencies": { |
11 | - "@mmckegg/mutant": "^3.10.1", | |
11 … | + "@mmckegg/mutant": "^3.11.0", | |
12 | 12 … | "brfs": "^1.4.3", |
13 | 13 … | "cont": "^1.0.3", |
14 | 14 … | "dataurl-": "^0.1.0", |
15 | 15 … | "depject": "^3.0.0", |
Built with git-ssb-web