Could you please send a bug report through F11 bug reporter right after it happened? Also run the connection test report (4-th option in the stem launcher), it might freeze a bit, don't worry, it is working, just wait till it send the report.
Meanwhile, please check that router/software is not blocking ports 7770, 8089, 5672, 5222, 8080, 21020-21036, 7401-7600 for the game, also turn off all programs which use internet heavily (like torrent programs, netflix clients), disable antivirus, turn off k9 web protection filter or similar to that filters, also, you can try to put your router into DMZ mode