handle client exits in server