My friend and I were playing Terraria together on LAN and we decided to take a break so I logged out so I wouldn't die and not even 10 minutes later I try logging back in and it gets stuck on connecting. I logged in using his internal IP the first time and when we checked his IP again after not being able to log in nothing had changed. We've tried forwarding ports 7777 and 31337-31338 (neither of which we did the first time), we tried turning off our firewalls, restarting both steam and terraria, and we've reset the router. In the 10 minutes that passed from me being offline nothing had changed except that I opened league of legends which i highly doubt would affect it.

Does anyone know what could have caused the problem or any suggestions on how to fix it?