Server: End processing thread on exit