Skip to content

Commit

Permalink
Ensure the request is closed in the same thread as the app in threade…
Browse files Browse the repository at this point in the history
…d mode

Fixes #307
  • Loading branch information
macournoyer committed May 15, 2016
1 parent 627397b commit b830ff5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/thin/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def receive_data(data)
def process
if threaded?
@request.threaded = true
EventMachine.defer(method(:pre_process), method(:post_process))
EventMachine.defer { post_process(pre_process) }
else
@request.threaded = false
post_process(pre_process)
Expand Down

0 comments on commit b830ff5

Please sign in to comment.