lib/celluloid/io/ssl_socket.rb in celluloid-io-0.16.2 vs lib/celluloid/io/ssl_socket.rb in celluloid-io-0.16.5.pre0

- old
+ new

@@ -4,16 +4,29 @@ module IO # SSLSocket with Celluloid::IO support class SSLSocket < Stream extend Forwardable - def_delegators :@socket, :read_nonblock, :write_nonblock, :close, :closed?, - :cert, :cipher, :client_ca, :peer_cert, :peer_cert_chain, :verify_result, :peeraddr + def_delegators :@socket, + :read_nonblock, + :write_nonblock, + :close, + :closed?, + :cert, + :cipher, + :client_ca, + :peeraddr, + :peer_cert, + :peer_cert_chain, + :post_connection_check, + :verify_result, + :sync_close= def initialize(io, ctx = OpenSSL::SSL::SSLContext.new) super() @context = ctx @socket = OpenSSL::SSL::SSLSocket.new(::IO.try_convert(io), @context) + @socket.sync_close = true if @socket.respond_to?(:sync_close=) end def connect @socket.connect_nonblock self