Re: [PATCH v3 1/1] rpc: Add the {repoll,retry} logic in virNetClientSetTLSSession

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, May 15, 2025 at 09:07:41AM +0800, yong.huang@xxxxxxxxxx wrote:
> From: Hyman Huang <yong.huang@xxxxxxxxxx>
> 
> As advised by the GNU TLS, the caller should attempt again
> if the gnutls_record_{recv,send} return EAGAIN or EINTR;
> check the following link to view the details:
> https://www.gnutls.org/manual/html_node/Data-transfer-and-termination.html
> 
> virNetClientSetTLSSession failed to handle EINTR/EGAIN,
> though EGAIN seems like it ought to be unlikely given that
> the caller waited for G_IO_IN.
> 
> Add the {repoll, retry} logic to handle EINTR/EGAIN that
> may happen theoretically. This may reduce the likelihood
> that the upper application receives the following error
> message utmostly when it calls the virConnectOpenAuth API:
> Unable to read TLS confirmation: Resource temporarily unavailable
> 
> Note that in order to fully avoid the mentioned problem, the
> upper application should retry virConnectOpenAuth.
> 
> Signed-off-by: Hyman Huang <yong.huang@xxxxxxxxxx>
> ---
>  src/rpc/virnetclient.c | 8 ++++++++
>  1 file changed, 8 insertions(+)

Reviewed-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>

and pushed


With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux