Don't dump the peer table when unable to find a replacement for a duplicate. This is a normal condition. Here's how it occurs: A and B have a connection, Y, which is fully up. Then one of them opens connection X in the other direction. Let us suppose B's ID is lower than A's, so that B is the peer which will take the initiative when killing duplicate connections. A B IAM--X--> <--X--IAM IAM--X--> Here, B notices the duplicate: <--Y--DUP Now, the network may send the data queued on connection Y before the data queued on connection X, and/or A may notice it first: <--Y--DUP Here, A looks for a replacement for Y and doesn't find one, because it doesn't yet know that X is connected to the same peer as Y. However, this doesn't hurt anything, because X will take over Y's duties as far as being a channel from A to B goes as soon as the IAM arrives, and that taking over of those duties is what duplicate replacement is all about.