Don't test the underlying input stream for readability unless a
previous read attempt returned EAGAIN; gnutls may be buffering data
internally, so we have to just assume we're readable until we see an
EAGAIN.
g_tls_connection_gnutls_check (GTlsConnectionGnutls *gnutls,
GIOCondition condition)
{
+ if (!gnutls->priv->internal_direction)
+ return TRUE;
+
if (gnutls->priv->handshaking || gnutls->priv->closing)
condition = gnutls->priv->internal_direction;