better widget hash (+ deps: shortid); re-registers widgets on reconnection
This commit is contained in:
parent
ab281dd534
commit
0f737bcedf
5 changed files with 22 additions and 4 deletions
|
|
@ -206,7 +206,7 @@ module.exports = {
|
|||
|
||||
removeWidget(data, clientId) {
|
||||
|
||||
delete widgetHashTable[data.hash + clientId]
|
||||
delete widgetHashTable[clientId][data.hash]
|
||||
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,9 @@ var bindCallbacks = function(callbacks) {
|
|||
})
|
||||
|
||||
socket.on('disconnect', function() {
|
||||
|
||||
callbacks.removeClientWidgets(socket.id)
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue