The networking application that I've written does TCP communication with N-1 (itself) other Machines in the List (N) of Machines participating in the system.
Upon application startup the application currently picks a Random Delay time (1000-3000ms) before attempting to connect to each of its peer systems
If Machine 1 attempts to Connect to Machine 2, at the same time as Machine 2 is attempting to Connect to Machine 1. Currently I just drop both connections, rechoose random times again (100-500ms) and reattempt the connections.
Each machine ultimately establishes a connection with every other machine, and the system is working, but I was thinking is there a better approach to resolving this situation?