Skip to content

Commit

Permalink
mod: do not raise fatal logger just when message could not be sended
Browse files Browse the repository at this point in the history
  • Loading branch information
TomFreudenberg committed Apr 20, 2018
1 parent db886ce commit 2635d3c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/midi-smtp-server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,11 @@ def serve(io)
on_connect_event(Thread.current[:ctx])
# handle connection
begin
# reply welcome
io.print "220 #{Thread.current[:ctx][:server][:local_host]} says welcome!\r\n" unless io.closed?
# while data handle communication
begin
# reply welcome
io.print "220 #{Thread.current[:ctx][:server][:local_host]} says welcome!\r\n" unless io.closed?

# while data handle communication
loop do
if IO.select([io], nil, nil, 0.1)

Expand Down

1 comment on commit 2635d3c

@TomFreudenberg
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome message reply is now also covered by rescue section

Please sign in to comment.