Commit 21cff15e65dacbb73a3c28e8c5434aee1e41784f
remove from local peers list on disconnect
Matt McKegg committed on 2/11/2018, 11:18:14 PMParent: f379402d0c78ad0469d94960abe197a33f6e54c5
Files changed
sbot.js | changed |
sbot.js | |||
---|---|---|---|
@@ -108,9 +108,9 @@ | |||
108 | 108 … | pull( | |
109 | 109 … | sbot.gossip.changes(), | |
110 | 110 … | pull.drain(data => { | |
111 | 111 … | if (data.peer) { | |
112 | - if (data.type === 'remove') { | ||
112 … | + if (data.type === 'remove' || data.type === 'disconnect') { | ||
113 | 113 … | connectedPeers.delete(data.peer.key) | |
114 | 114 … | localPeers.delete(data.peer.key) | |
115 | 115 … | } else { | |
116 | 116 … | if (data.peer.source === 'local') { |
Built with git-ssb-web