• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

socketry / socketry / 108
93%

Build:
DEFAULT BRANCH: master
Ran 26 Nov 2016 08:40PM UTC
Jobs 3
Files 21
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
108

push

travis-ci

tarcieri
Fix Socketry::SSL::Socket#close

124a50a0 introduced a regression in the close behavior on Ruby 2.2.x
by adding the following line:

    @ssl_socket.sync_close = true

This closes the underlying TCP socket when the OpenSSL::SSL::SSLSocket wrapping
it is closed.

Unfortunately Socketry::SSL::Socket#close was calling "super" which invoked the
corresponding ::TCPSocket close methods, but at the *end* after closing the
OpenSSL::SSL::SSLSocket, which already took care of closing the ::TCPSocket
thanks to `#sync_close = true`

We still want to call super though, to ensure the instance variables associated
with the TCP socket are properly cleared.

Solution: call `super` *first* to close the TCP socket and clear the associated
instance variables, then close the OpenSSL::SSL::SSLSocket. This ensures both
are closed, their associated instance variables cleared, and won't error out if
the TCP socket is already closed.

This should ensure that all sockets are closed in all cases, even if someone
manages to obtain the raw OpenSSL::SSL::SSLSocket or its underlying ::TCPSocket.

657 of 718 relevant lines covered (91.5%)

11.82 hits per line

Jobs
ID Job ID Ran Files Coverage
1 108.1 (2.2.6) 26 Nov 2016 08:40PM UTC 0
93.72
Travis Job 108.1
2 108.2 (2.3.3) 26 Nov 2016 08:40PM UTC 0
93.72
Travis Job 108.2
3 108.3 (jruby-9.1.6.0) 26 Nov 2016 08:42PM UTC 0
0.0
Travis Job 108.3
Source Files on build 108
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #108
  • 2a5a6ab2 on github
  • Prev Build on master (#107)
  • Next Build on master (#109)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc