Skip to content

Commit

Permalink
fix: Software caused connection abort errors due fast open and close …
Browse files Browse the repository at this point in the history
…connections
  • Loading branch information
TomFreudenberg committed Apr 19, 2018
1 parent d955cbb commit e11d4bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/midi-smtp-server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def serve(io)
# handle connection
begin
# reply welcome
io.print "220 #{Thread.current[:ctx][:server][:local_host]} says welcome!\r\n"
io.print "220 #{Thread.current[:ctx][:server][:local_host]} says welcome!\r\n" unless io.closed?
# while data handle communication
begin
loop do
Expand Down Expand Up @@ -224,7 +224,7 @@ def serve(io)
# log smtp dialog // message data is stored separate
logger.debug(">>> #{output}")
# smtp dialog response
io.print("#{output}\r\n")
io.print("#{output}\r\n") unless io.closed?
end

end
Expand Down
4 changes: 2 additions & 2 deletions midi-smtp-server.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|
s.name = 'midi-smtp-server'
s.version = '2.1.2'
s.date = '2015-09-12'
s.version = '2.1.3'
s.date = '2018-04-19'
s.summary = "MidiSmtpServer Class"
s.description = "A small and highly customizable ruby SMTP-Server."
s.authors = ["Tom Freudenberg"]
Expand Down

0 comments on commit e11d4bd

Please sign in to comment.