This moves the reconnect logic into a single function, so the netplay code doesn't need to be written 2 times