notifications: Investigate possible memory leak with pending outbound substream tracking #295
Labels
bug
Something isn't working
Content-Length: 229639 | pFad | https://github.com/paritytech/litep2p/issues/295
C8Fetched URL: https://github.com/paritytech/litep2p/issues/295
Alternative Proxies:
The metrics implementation exposed an abnormal behaviour in our state tracking:
It looks like the following data structure grows over time:
litep2p/src/protocol/notification/mod.rs
Lines 261 to 262 in 28d42c6
Elements are added to the hashmap on:
litep2p/src/protocol/notification/mod.rs
Line 919 in 28d42c6
litep2p/src/protocol/notification/mod.rs
Line 1093 in 28d42c6
Elements are removed from the hashmap on:
litep2p/src/protocol/notification/mod.rs
Line 514 in 28d42c6
litep2p/src/protocol/notification/mod.rs
Line 816 in 28d42c6
Possible causes
It looks like we should remove the state on the connection closed as well:
litep2p/src/protocol/notification/mod.rs
Line 445 in 28d42c6
The text was updated successfully, but these errors were encountered: