ftw 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ftw/connection.rb +13 -9
- data/lib/ftw/version.rb +1 -1
- metadata +1 -1
data/lib/ftw/connection.rb
CHANGED
@@ -249,16 +249,20 @@ class FTW::Connection
|
|
249
249
|
|
250
250
|
# End this connection, specifying why.
|
251
251
|
def disconnect(reason)
|
252
|
-
|
253
|
-
@socket.
|
254
|
-
|
255
|
-
|
256
|
-
|
252
|
+
if @socket.is_a?(OpenSSL::SSL::SSLSocket)
|
253
|
+
@socket.sysclose()
|
254
|
+
else
|
255
|
+
begin
|
256
|
+
@socket.close_read
|
257
|
+
rescue IOError => e
|
258
|
+
# Ignore, perhaps we shouldn't ignore.
|
259
|
+
end
|
257
260
|
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
261
|
+
begin
|
262
|
+
@socket.close_write
|
263
|
+
rescue IOError => e
|
264
|
+
# Ignore, perhaps we shouldn't ignore.
|
265
|
+
end
|
262
266
|
end
|
263
267
|
end # def disconnect
|
264
268
|
|
data/lib/ftw/version.rb
CHANGED