take disconnect into account
This commit is contained in:
parent
61ece2905a
commit
6458bf7398
1 changed files with 7 additions and 2 deletions
|
|
@ -918,8 +918,13 @@ const onSimplerReceivedRequests = (cb, gun, user, SEA) => {
|
||||||
user
|
user
|
||||||
.get(Key.USER_TO_INCOMING)
|
.get(Key.USER_TO_INCOMING)
|
||||||
.map()
|
.map()
|
||||||
.on((_, userPK) => {
|
.on((incomingID, userPK) => {
|
||||||
requestorsAlreadyAccepted.add(userPK)
|
const disconnected = incomingID === null
|
||||||
|
if (disconnected) {
|
||||||
|
requestorsAlreadyAccepted.delete(userPK)
|
||||||
|
} else {
|
||||||
|
requestorsAlreadyAccepted.add(userPK)
|
||||||
|
}
|
||||||
|
|
||||||
callCB()
|
callCB()
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue