zas-client 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/zas/client.rb +6 -1
- metadata +1 -1
data/lib/zas/client.rb
CHANGED
@@ -18,7 +18,7 @@ module Zas
|
|
18
18
|
self.context = ZMQ::Context.new
|
19
19
|
self.logger = Syslogger.new(config.name, Syslog::LOG_PID, Syslog::LOG_LOCAL0)
|
20
20
|
|
21
|
-
at_exit {
|
21
|
+
at_exit { close }
|
22
22
|
end
|
23
23
|
|
24
24
|
# Public: Authenticate the given credentials.
|
@@ -41,6 +41,11 @@ module Zas
|
|
41
41
|
@socket = nil
|
42
42
|
end
|
43
43
|
|
44
|
+
# Public: Close the context.
|
45
|
+
def close
|
46
|
+
context.close if context
|
47
|
+
end
|
48
|
+
|
44
49
|
private
|
45
50
|
attr_accessor :context
|
46
51
|
attr_accessor :host
|