Well if they both start as "server" then one clicks Connect. As soon as the connection is established disable both Connect buttons. Something like that.

When the connection drops both start listening again, enable Connect.