Won't fix Gavatar Timeout

digitalpoint

Well-known member
It's rare, but I see it in the server error log about once a week...
Code:
Zend_Http_Client_Adapter_Exception: Unable to Connect to ssl://secure.gravatar.com:443. Error #110: Connection timed out - library/Zend/Http/Client/Adapter/Socket.php:235

XenForo_Model_Avatar is already omitting the log writing if the error is "Read timed out", but probably not a bad idea to also omit if there was a general connection error too...

This:
PHP:
if (strpos($e->getMessage(), 'Read timed out') === false)
could be this?
PHP:
if (strpos($e->getMessage(), 'Read timed out') === false || strpos($e->getMessage(), 'Unable to Connect') === false)
 
I think I'm going to leave this as is, as I have seen some firewalls that are overly aggressive and block outgoing connections - I think hiding the error here might mask that situation.
 
Top Bottom