search for: closecallback

Displaying 2 results from an estimated 2 matches for "closecallback".

Did you mean: close_callback
2017 May 17
1
Re: Callback re-registration after libvirtd restart
...onn *libvirt.Connect, reason > libvirt.ConnectCloseReason) { > log.Printf("In here") > } > > func main() { > libvirt.EventRegisterDefaultImpl() > > hv, err := libvirt.NewConnect("qemu:///session") > > err = hv.RegisterCloseCallback(libvirt_close_callback) > if err != nil { > log.Printf("unable to register close callback") > return > } > > for { > libvirt.EventRunDefaultImpl() > } > > } > > > Printin...
2017 May 17
2
Re: Callback re-registration after libvirtd restart
...> log.Printf("close callback: %+v", reason) > > } > > > > func event_listen() { > > log.Printf("event_listen %s", conf.Libvirt.LocalUrl) > > hv, err := libvirt.NewConnect(conf.Libvirt.LocalUrl) > > > > err = hv.RegisterCloseCallback(libvirt_close_callback) > > if err != nil { > > log.Printf("unable to register close callback") > > return > > } > > ... > > > > The callback fires only when I kill my app, > > Looks like you are missing a call to lib...