def checkin
if ::Thread.current[@key]
if ::Thread.current[@key_count] == 1
@available.push(::Thread.current[@key])
::Thread.current[@key]= nil
else
::Thread.current[@key_count]-= 1
end
else
raise ConnectionPool::Error, 'no connections are checked out'
end
nil
end
This PR is following the logic to clear thread data in the checkin method.
Still leaking memory when using with Faraday. Since the
shutdown
method added in https://github.com/drbrain/net-http-persistent/pull/98 cannot be called from the Faraday adapter, empty arrays remain in the main thread after making requests:In the connection_pool gem, thread data is set to
nil
in thecheckin
method:This PR is following the logic to clear thread data in the
checkin
method.@tenderlove It seems the change bumping the version to
3.0.1
is not merged into the master branch. How should I bump the version?@jcarres-mdsol @jfeltesse-mdsol @cabbott @ssteeg-mdsol @piao-mdsol