uninterruptible 2.5.2 → 2.5.3
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/uninterruptible/server.rb +1 -1
- data/lib/uninterruptible/version.rb +1 -1
- data/lib/uninterruptible.rb +0 -1
- metadata +1 -2
- data/lib/uninterruptible/ssl_extensions.rb +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc6895a8d950201b505824cb01a5b5822e760993
|
4
|
+
data.tar.gz: 16dcbfd142547b5aaa2fcb2e743eb574fbeb0f92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4b6ef5ac65cc75a40a8fbc589b986c52f61a9fc340cd347a855dc2754e35659e02ca01a43db42eee7de63d21fac6dabb9653ef543fcc7502f3e274b0cb81439
|
7
|
+
data.tar.gz: 74f5a5afac38b36906987fc19d55a966354cde588d85a341af6d9e3454606c3691981953b43f567dc968107d70ebeb93939eb1fad94236a442eb732ab4c264df
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 2.5.3
|
4
|
+
* Accept new connections with #accept instead of #accept_nonblock
|
5
|
+
* Remove SSLExtensions module as this is no longer required
|
6
|
+
|
3
7
|
## 2.5.2
|
4
8
|
* Pass a class to UNIXSocket.recv_io to have the C-code instantiate our socket server. If we don't, they have a habit of getting garbage collected resulting in Errno:EBADF exceptions
|
5
9
|
|
@@ -110,7 +110,7 @@ module Uninterruptible
|
|
110
110
|
# loop for example. By default this creates one thread per connection. Override this method to provide a new
|
111
111
|
# concurrency model.
|
112
112
|
def accept_client_connection
|
113
|
-
Thread.start(socket_server.
|
113
|
+
Thread.start(socket_server.accept) do |client_socket|
|
114
114
|
process_request(client_socket)
|
115
115
|
end
|
116
116
|
rescue OpenSSL::SSL::SSLError => e
|
data/lib/uninterruptible.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uninterruptible
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Wentworth
|
@@ -78,7 +78,6 @@ files:
|
|
78
78
|
- lib/uninterruptible/file_descriptor_server.rb
|
79
79
|
- lib/uninterruptible/network_restrictions.rb
|
80
80
|
- lib/uninterruptible/server.rb
|
81
|
-
- lib/uninterruptible/ssl_extensions.rb
|
82
81
|
- lib/uninterruptible/tls_server_factory.rb
|
83
82
|
- lib/uninterruptible/version.rb
|
84
83
|
- uninterruptible.gemspec
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# Augment some parts of OpenSSL::SSL::SSLServer from stdlib for extra functionality
|
2
|
-
module OpenSSL
|
3
|
-
module SSL
|
4
|
-
# Extend this module from stdlib to delegate additional methods to the underlying TCP transport when wrapping
|
5
|
-
# with an OpenSSL::SSL::SSLServer
|
6
|
-
module SocketForwarder
|
7
|
-
# Fetch the file descriptor ID from the underlying transport
|
8
|
-
def to_i
|
9
|
-
to_io.to_i
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
# Extend OpenSSL::SSL::SSLServer to implement accept_nonblock (only #accept is implemented by stdlib)
|
14
|
-
class SSLServer
|
15
|
-
def accept_nonblock
|
16
|
-
sock = @svr.accept_nonblock
|
17
|
-
|
18
|
-
begin
|
19
|
-
ssl = OpenSSL::SSL::SSLSocket.new(sock, @ctx)
|
20
|
-
ssl.sync_close = true
|
21
|
-
ssl.accept if @start_immediately
|
22
|
-
ssl
|
23
|
-
rescue SSLError
|
24
|
-
sock.close
|
25
|
-
raise
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|