Recover from SSL protocol exceptions.

Previously this appeared to work, but only because our test environment
usually had multiple IP addresses for localhost.
Merge pull request #577 from square/jwilson_0301_recover_from_ssl_protocol_failures

Recover from SSL protocol exceptions.