tangled
alpha
login
or
join now
evbogue.com
/
wiredove
1
fork
atom
a demonstration replicated social networking web app built with anproto
wiredove.net/
social
ed25519
protocols
1
fork
atom
overview
issues
pulls
pipelines
if we have not connected websocket yet give it a sec
Everett Bogue
9 months ago
a475a3d0
589dd92d
+11
-3
1 changed file
expand all
collapse all
unified
split
websocket.js
+11
-3
websocket.js
···
4
4
const pubs = new Set()
5
5
6
6
export const sendWs = async (msg) => {
7
7
-
pubs.forEach(pub => {
8
8
-
pub.send(msg)
9
9
-
})
7
7
+
if (pubs.size) {
8
8
+
pubs.forEach(pub => {
9
9
+
pub.send(msg)
10
10
+
})
11
11
+
} else {
12
12
+
setTimeout(async () => {
13
13
+
pubs.forEach(pub => {
14
14
+
pub.send(msg)
15
15
+
})
16
16
+
}, 1000)
17
17
+
}
10
18
}
11
19
12
20
export const makeWs = async (pub) => {