Add timeout to avoid deadlocking client connections