Thread now exits when connection has been closed.
Merge branch 'Dev-MasterPI' of https://github.com/Thywin/Thywin into Dev-MasterPI
Merge branch 'Dev-MasterPI' of https://github.com/Thywin/Thywin into Dev-MasterPI