When timing out while reading from a TLS server, shutdown the socket properly.