• D
    Add an explicit virNetClientClose method · e06c8ede
    Daniel P. Berrange 提交于
    Since the I/O callback registered against virNetSocket will
    hold a reference on the virNetClient, we can't rely on the
    virNetClientFree to be able to close the network connection.
    The last reference will only go away when the event callback
    fires (likely due to EOF from the server).
    
    This is sub-optimal and can potentially cause a leak of the
    virNetClient object if the server were to not explicitly
    close the socket itself
    
    * src/remote/remote_driver.c: Explicitly close the client
      object when disconnecting
    * src/rpc/virnetclient.c, src/rpc/virnetclient.h: Add a
      virNetClientClose method
    e06c8ede
virnetclient.h 3.0 KB