Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-shell
Commits
c28af5c6
Commit
c28af5c6
authored
Feb 10, 2016
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trying new workaround for shutdown_pipe issue
parent
0c25846d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
spec/httpunix_spec.rb
spec/httpunix_spec.rb
+14
-2
No files found.
spec/httpunix_spec.rb
View file @
c28af5c6
...
...
@@ -25,9 +25,21 @@ class HTTPUNIXServer < WEBrick::HTTPServer
@listeners
<<
server
end
# Workaround:
# https://bugs.ruby-lang.org/issues/10956
# Affecting Ruby 2.2
# Fix for 2.2 is at https://github.com/ruby/ruby/commit/ab0a64e1
# However, this doesn't work with 2.1. The following should work for both:
def
start
(
&
block
)
setup_shutdown_pipe
super
.
start
(
&
block
)
@shutdown_pipe
=
IO
.
pipe
shutdown_pipe
=
@shutdown_pipe
super
(
&
block
)
end
def
cleanup_shutdown_pipe
(
shutdown_pipe
)
@shutdown_pipe
=
nil
return
if
!
shutdown_pipe
super
(
shutdown_pipe
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment