upgrade for our main bbs server

This commit is contained in:
2026-04-28 22:47:52 +02:00
parent ce005cdb1b
commit d9232eabb4
5 changed files with 31 additions and 5 deletions

View File

@@ -13,7 +13,16 @@ module BBS
puts "BBS listening on port #{@port} — connect with: telnet localhost #{@port}"
loop do
client = server.accept
Thread.new(client) { |c| Session.new(c).run rescue nil }
Thread.new(client) do |c|
session = Session.new(c)
begin
session.run
rescue => e
nil
ensure
BBS.config.on_session_end&.call(session)
end
end
end
rescue Interrupt
puts "\nServer stopped."