git ssb

16+

Dominic / patchbay



Commit 53ee02ec04088370e3ea743c0440a3c790b1fc64

use new mutant/dict onListen api for Network polling

mix irving committed on 1/11/2017, 4:10:04 AM
Parent: 0a50ea2f8ea043de9dac604adc0602cd504b2f25

Files changed

modules_extra/network.jschanged
package.jsonchanged
modules_extra/network.jsView
@@ -205,20 +205,15 @@
205205
206206 function obs_gossip_peers (api) {
207207 var timer = null
208208 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 + }
218215 })
219- // TODO - remove this line
220- setInterval(refresh, 5e3)
221216
222217 refresh()
223218
224219 return toCollection.values(state)
package.jsonView
@@ -7,9 +7,9 @@
77 "type": "git",
88 "url": "git://github.com/dominictarr/patchbay.git"
99 },
1010 "dependencies": {
11- "@mmckegg/mutant": "^3.10.1",
11 + "@mmckegg/mutant": "^3.11.0",
1212 "brfs": "^1.4.3",
1313 "cont": "^1.0.3",
1414 "dataurl-": "^0.1.0",
1515 "depject": "^3.0.0",

Built with git-ssb-web