Skip to content
Snippets Groups Projects

Resolve "Memory leak on WS2P"

Merged Cédric Moreau requested to merge 1278-memory-leak-on-ws2p into 1.6
2 files
+ 31
14
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -102,6 +102,11 @@ export class WS2PServerMessageHandler implements WS2PMessageHandler {
}
this.server.logger.warn(message)
}
setTimeout(() => {
if (this.errors[documentHash]) {
delete this.errors[documentHash]
}
}, 1000 * WS2PConstants.ERROR_RECALL_DURATION_IN_SECONDS)
} else {
// Remember the error for some time
if (!this.errors[documentHash]) {
@@ -112,7 +117,9 @@ export class WS2PServerMessageHandler implements WS2PMessageHandler {
}
this.errors[documentHash].pubkeys[c.pubkey] = [json.body]
setTimeout(() => {
delete this.errors[documentHash]
if (this.errors[documentHash]) {
delete this.errors[documentHash]
}
}, 1000 * WS2PConstants.ERROR_RECALL_DURATION_IN_SECONDS)
}
if (e !== "Block already known"
Loading