]> git.proxmox.com Git - mirror_qemu.git/blobdiff - io/channel-tls.c
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2019-01-24' into staging
[mirror_qemu.git] / io / channel-tls.c
index 9628e6fa479f899d3688ca92cbce9b2b75add327..c98ead21b01ea23cbfa0a99a3cff4c01141158e6 100644 (file)
@@ -275,6 +275,9 @@ static ssize_t qio_channel_tls_readv(QIOChannel *ioc,
                 } else {
                     return QIO_CHANNEL_ERR_BLOCK;
                 }
+            } else if (errno == ECONNABORTED &&
+                       (tioc->shutdown & QIO_CHANNEL_SHUTDOWN_READ)) {
+                return 0;
             }
 
             error_setg_errno(errp, errno,
@@ -357,6 +360,8 @@ static int qio_channel_tls_shutdown(QIOChannel *ioc,
 {
     QIOChannelTLS *tioc = QIO_CHANNEL_TLS(ioc);
 
+    tioc->shutdown |= how;
+
     return qio_channel_shutdown(tioc->master, how, errp);
 }