pubToFeed handles disconnect better
This commit is contained in:
parent
3b663f8136
commit
bc55e59c73
1 changed files with 9 additions and 1 deletions
|
|
@ -177,7 +177,15 @@ const react = () => {
|
|||
*/
|
||||
const newIncoming = inc || null
|
||||
|
||||
if (newIncoming === pubToLastIncoming[pub]) {
|
||||
if (
|
||||
newIncoming === pubToLastIncoming[pub] ||
|
||||
// if disconnected, the same incoming feed will try to overwrite the
|
||||
// nulled out pubToLastIncoming[pub] entry. Making the listener for that
|
||||
// pub feed pair fire up again, etc. Now. When the user disconnects from
|
||||
// this side of things. He will overwrite the pub to incoming with null.
|
||||
// Let's allow that.
|
||||
(pubToFeed[pub] === 'disconnected' && newIncoming !== null)
|
||||
) {
|
||||
// eslint-disable-next-line no-continue
|
||||
continue
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue