Use only one thread for receiving mails to avoid concurrency problems

This commit is contained in:
Patrick Gansterer 2017-10-09 16:41:09 +02:00
parent 08ac3aa539
commit a6dd7c731a

View file

@ -54,7 +54,7 @@ namespace :foodsoft do
port = ENV['SMTP_SERVER_PORT'].present? ? ENV['SMTP_SERVER_PORT'].to_i : 2525 port = ENV['SMTP_SERVER_PORT'].present? ? ENV['SMTP_SERVER_PORT'].to_i : 2525
host = ENV['SMTP_SERVER_HOST'] host = ENV['SMTP_SERVER_HOST']
rake_say "Started SMTP server for incoming email on port #{port}." rake_say "Started SMTP server for incoming email on port #{port}."
server = FoodsoftMailReceiver.new port, host server = FoodsoftMailReceiver.new port, host, 1
server.start server.start
server.join server.join
end end