Change to pass to socketTimeout var to the function instead of changing the property itself.