Added a response timeout to prevent connections from hanging.