Skip to content

Commit

Permalink
IRCボット:シグナルハンドラで参照する変数名を修正する
Browse files Browse the repository at this point in the history
Fixes #277

`sig` -> `signal`
  • Loading branch information
ochaochaocha3 committed May 29, 2021
1 parent 022ea35 commit d828118
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ircs/irc_bot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ def set_signal_handler(bot, status_server_signal_io_w)
# シグナルを捕捉し、ボットを終了させる処理
%i(SIGINT SIGTERM).each do |signal|
Signal.trap(signal) do
bot.quit(@quit_message.empty? ? "Caught #{sig}" : @quit_message)
bot.quit(@quit_message.empty? ? "Caught #{signal}" : @quit_message)
status_server_signal_io_w.write('q')
end
end
Expand Down

0 comments on commit d828118

Please sign in to comment.