libvirt_ffi 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f29a04c1f627275716dfa267007ef68f83666d5948dff69d978338fd3b4d9b07
4
- data.tar.gz: 7f358f6af3b96ef574fdcc9dc2e913ddb0290ad9be18bd1945d8f80731fc5d1b
3
+ metadata.gz: dc49a5a9986110313860c3dd0390c7485e598b4407a52d35009381c1255ca9c5
4
+ data.tar.gz: 6ebd4be029bba4e8a50dc0efc996d91e357e8d7616b1f64f66dde66503dcfc21
5
5
  SHA512:
6
- metadata.gz: 2b7fe3d2e0c4b2a828352ade8d12a27e825ec4d6e3b0055baf6ddcdd655f3d2d4fe0db595e6a58399b32a58b8cf09cb3b92f9c4e03e27934b9efd3d931ebb8f5
7
- data.tar.gz: 179640661f66bd1b1c79d5417312c68ccd1e70c62602c963a1b59a33f02c4534413c5dc6c8f43236e4fbdcbf45c6c015cdc1ba24780fd85b642a56997c2ed884
6
+ metadata.gz: 0d9716eca3d06aa6d0e3479e50c1bb93142968a9b34ad3df59a35a53dfab5b651f59d49e096a89362275700b2cdfd72f6b9832c6bbd187645fb3d236e6478afe
7
+ data.tar.gz: cac12813a17c8ef4a6bd41ebbed45437d3c3908254866435bcb3bdeb17b457e65c6107c72b4fdd9b553699af2ee8608d2a6a56b6d4bc10ac0437d932e1acd15d
@@ -141,7 +141,12 @@ module Libvirt
141
141
  @close_data = { opaque: opaque, block: block }
142
142
  @close_cb = FFI::Host.callback_function(:virConnectCloseFunc) do |_conn, reason, _op|
143
143
  dbg { "CONNECTION CLOSED @conn_ptr=#{@conn_ptr} reason=#{reason}" }
144
- @close_data[:block].call(self, reason, @close_data[:opaque])
144
+ block = @close_data[:block]
145
+ opaque = @close_data[:opaque]
146
+ # we clear @closed_data here, because connection can be opened again and
147
+ # add new close callback inside `block`.
148
+ @close_data = nil
149
+ block.call(self, reason, opaque)
145
150
  end
146
151
  @close_free_func = FFI::Common.free_function do
147
152
  dbg { "CONNECTION CLOSED FREE FUNC @conn_ptr=#{@conn_ptr}" }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Libvirt
4
- VERSION = '0.5.5'
4
+ VERSION = '0.5.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libvirt_ffi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Talakevich
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-04-20 00:00:00.000000000 Z
11
+ date: 2020-04-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi