Skip to content

Commit

Permalink
ruby client: add --max-pending-finished-sessions command line option
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Feb 24, 2013
1 parent a4b9cc9 commit ff6d5da
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion binding/ruby/lib/milter/client/command-line.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (C) 2010-2011 Kouhei Sutou <kou@clear-code.com>
# Copyright (C) 2010-2013 Kouhei Sutou <kou@clear-code.com>
#
# This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
Expand Down Expand Up @@ -210,6 +210,14 @@ def setup_milter_options
milter_conf.packet_buffer_size = size
end

@option_parser.on("--max-pending-finished-sessions=N",
Integer,
"Don't hold over N pending finished sessions.",
"(#{milter_conf.max_pending_finished_sessions})") do |n|
raise OptionParser::InvalidArgument if n <= 0
milter_conf.max_pending_finished_sessions = n
end

@option_parser.on("--[no-]handle-signal",
"Handle SIGHUP, SIGINT and SIGTERM signals",
"(#{milter_conf.handle_signal?})") do |boolean|
Expand Down

0 comments on commit ff6d5da

Please sign in to comment.