Add socket timeout to prevent requests from blocking