added return statement on quit to close thread when communication with client has ended