]> xenbits.xensource.com Git - libvirt.git/commit
rpc: Discard non-blocking calls only when necessary
authorJiri Denemark <jdenemar@redhat.com>
Fri, 20 Apr 2012 14:12:26 +0000 (16:12 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Thu, 26 Apr 2012 14:30:23 +0000 (16:30 +0200)
commitb1e374a7ac56927cfe62435179bf0bba1e08b372
treeacfc9ca647052acee3e72cd321f0f945f6d09d4e
parent6d64694762b26387b684dad2179824ec1fa40575
rpc: Discard non-blocking calls only when necessary

Currently, non-blocking calls are either sent immediately or discarded
in case sending would block. This was implemented based on the
assumption that the non-blocking keepalive call is not needed as there
are other calls in the queue which would keep the connection alive.
However, if those calls are no-reply calls (such as those carrying
stream data), the remote party knows the connection is alive but since
we don't get any reply from it, we think the connection is dead.

This is most visible in tunnelled migration. If it happens to be longer
than keepalive timeout (30s by default), it may be unexpectedly aborted
because the connection is considered to be dead.

With this patch, we only discard non-blocking calls when the last call
with a thread is completed and thus there is no thread left to keep
sending the remaining non-blocking calls.
src/rpc/virnetclient.c