Changesets can be listed by changeset number.
The Git repository is here.
Changeset 165
Addresses the most serious part of Ticket #101. Although the form of
file reading used ought to self-close the file in question, it does
not seem to. Perhaps it is reliant on garbage collection of the
temporary File object, but garbage collection occurs so infrequently
that the file can stay open for a very long time - so long in fact
that "Too many open file" errors are seen during numerous visits to
the web site in a short space of time.
In any event, although more verbose, the new code in the Gem is quite
explicit about closing the file after reading and, according to lsof,
does so imediately. As an efficiency note, it is clear that this
aspect of Hub needs a lot of work - the file gets opened and closed
very often (typically twice for a site-based access as the secure
cookie is first read, then written after last accessed time update).
- Comitted by: rool
- Date: Saturday December 23 17:15:01 2006 (over 18 years ago)
Affected files:
- rool/rails/gems/hubssolib/trunk/VERSION (diff)
- rool/rails/gems/hubssolib/trunk/hubssolib.gemspec (diff)
- rool/rails/gems/hubssolib/trunk/lib/hub_sso_lib.rb (diff)
rool/rails/gems/hubssolib/trunk/VERSION:
prev. | current | |
1 | ||
1 | 0.2.3 (23-Dec-2006) |
rool/rails/gems/hubssolib/trunk/hubssolib.gemspec:
prev. | current | |
s.platform = Gem::Platform::RUBY | ||
s.name = 'hubssolib' | ||
7 | | |
7 | s.version = '0.2.3' | |
s.author = 'Andrew Hodgkinson and others' | ||
s.email = 'ahodgkin@rowing.org.uk' | ||
s.homepage = 'http://pond.org.uk/ruby/hub/' |
rool/rails/gems/hubssolib/trunk/lib/hub_sso_lib.rb:
prev. | current | |
if @rnd_size < 1024 | ||
raise "HubSsoLib::Crypto objects need at least 1024 bytes of random data - file '#{rnd_file}' is too small" | ||
else | ||
88 | | |
88 | f = File.new(rnd_file, 'rb') | |
89 | @rnd_data = f.read | |
90 | f.close | |
end | ||
end | ||