So this is a pretty obscure edge case but I spent several hours trying to figure out why this is happening without any success so far.
This issue can be recreated by:
listpeers will not return the peer.xucli shutdown.It can also be recreated by going into test/p2p/sanity.spec.ts and moving the should fail when connecting to an unexpected node pub key test case above the should disconnect successfully test case. After doing that, run npm run test:p2p and you'll see the same thing, the test will never end and ping pongs will keep being passed back and forth.
This is a low priority because it's such a weird edge case, but it may be indicative of something we're doing wrong in the p2p layer. I'll revisit this issue at some point, but I hit a wall trying to solve it yesterday and if another set of eyes wants to take a look at it that would be great.
Confirmed that this is still an issue.
Tested this today to verify this is no longer an issue.
Most helpful comment
Tested this today to verify this is no longer an issue.