handle EOFErrors when writing to the ssl_connection