Skip to content

Commit

Permalink
Fixed a potential deadlock or using a partially loaded stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
godfat committed Dec 11, 2015
1 parent ba541bc commit 8b85837
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
13 changes: 13 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# CHANGES

## rest-core 3.5.9 -- 2015-12-11

### Bugs fixed

* Fixed a potential deadlock or using a partially loaded stuff for
_httpclient_. We fixed this by requiring eagerly instead of loading
it lazily. The offender was: _http-cookie_: `http/cookie_jar/hash_store.rb`.
_httpclient_ could try to load this eagerly or just don't load it since
we're not using `cookie_manager` anyway. The errors we've seen:
* `NoMethodError: undefined method `implementation' for HTTP::CookieJar::AbstractStore:Class`
* `ArgumentError: cookie store unavailable: :hash`
* deadlock (because it's requiring it in a thread)

## rest-core 3.5.8 -- 2015-12-07

### Enhancements
Expand Down
3 changes: 3 additions & 0 deletions lib/rest-core/engine/http-client.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

require 'httpclient'
# httpclient could require this in a thread causing deadlock, load it first!
require 'http/cookie_jar/hash_store'

require 'rest-core/engine'

class RestCore::HttpClient < RestCore::Engine
Expand Down
2 changes: 1 addition & 1 deletion lib/rest-core/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

module RestCore
VERSION = '3.5.8'
VERSION = '3.5.9'
end
6 changes: 3 additions & 3 deletions rest-core.gemspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# -*- encoding: utf-8 -*-
# stub: rest-core 3.5.8 ruby lib
# stub: rest-core 3.5.9 ruby lib

Gem::Specification.new do |s|
s.name = "rest-core"
s.version = "3.5.8"
s.version = "3.5.9"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib"]
s.authors = ["Lin Jen-Shin (godfat)"]
s.date = "2015-12-07"
s.date = "2015-12-11"
s.description = "Modular Ruby clients interface for REST APIs.\n\nThere has been an explosion in the number of REST APIs available today.\nTo address the need for a way to access these APIs easily and elegantly,\nwe have developed rest-core, which consists of composable middleware\nthat allows you to build a REST client for any REST API. Or in the case of\ncommon APIs such as Facebook, Github, and Twitter, you can simply use the\ndedicated clients provided by [rest-more][].\n\n[rest-more]: https://github.com/godfat/rest-more"
s.email = ["godfat (XD) godfat.org"]
s.files = [
Expand Down

0 comments on commit 8b85837

Please sign in to comment.