server will end thread after exception