em-synchrony-moped 0.9.3 → 0.9.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'em-synchrony-moped'
5
- s.version = "0.9.3"
5
+ s.version = "0.9.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Adam Lebsack"]
@@ -71,6 +71,10 @@ silence_warnings do
71
71
 
72
72
 
73
73
  class Connection
74
+ def connected?
75
+ @sock && !@sock.instance_variable_get("@remote_closed") && !@sock.closed?
76
+ end
77
+
74
78
  def connect
75
79
  @sock = if !!options[:ssl]
76
80
  Sockets::SSL.connect(host, port, timeout, options)
@@ -95,7 +99,6 @@ silence_warnings do
95
99
  def connect(host, port, timeout, options={})
96
100
  socket = EM.connect(host, port, self) do |c|
97
101
  c.pending_connect_timeout = timeout
98
- c.comm_inactivity_timeout = timeout
99
102
  c.options = options.merge(:host => host)
100
103
  end
101
104
  # In TCPSocket, new against a closed port raises Errno::ECONNREFUSED.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: em-synchrony-moped
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: