See https://github.com/bitcoin/bitcoin/runs/9621443864 (master)
The problem here is is that calling disconnect_p2ps
waits until self.num_test_p2p_connections() == 0
.
num_test_p2p_connections()
checks the field subver
in getpeerinfo
to distinguish p2p nodes from full nodes.
However, if we are dealing with a p2p connection that has never sent a version, the node has never received the special subversion and the wait is ineffective (we continue even though the disconnection is not yet completed).