virt plugin: Added timeout to event_loop thread
authorPavel Rochnyack <pavel2000@ngs.ru>
Fri, 24 May 2019 10:48:18 +0000 (17:48 +0700)
committerPavel Rochnyack <pavel2000@ngs.ru>
Fri, 24 May 2019 10:48:18 +0000 (17:48 +0700)
commitc09f8ee768891aee1222ad0a3e19c66b099cc973
treea8d41a80195fc95f3071e0e763df00ee97009526
parent7401da0aa5289f58ee1a99507ad4edda04514629
virt plugin: Added timeout to event_loop thread

As per virEventRunDefaultImpl() documentation, this function will block
forever if there are no registered event handlers.

This leads to Collectd is unable to correctly stop event_loop thread
if libvirtd was restarted.

Added empty timeout callback to fix this.
src/virt.c