Server handles disconnects gracefully