test: attempt to send QUIT to smtp-dummy in case mail send failed

If mail sending from emacs fails before it has chance to connect
to the smtp-dummy mail server, the opportunistic QUIT message
sending makes smtp-dummy to exit.
This commit is contained in:
Tomi Ollila 2011-11-16 23:25:19 +02:00 committed by David Bremner
parent 8efdc0518d
commit c832dad322

View file

@ -398,6 +398,8 @@ emacs_deliver_message ()
(insert \"${body}\")
$@
(message-send-and-exit))"
# opportunistically quit smtp-dummy in case above fails.
{ echo QUIT > /dev/tcp/localhost/25025; } 2>/dev/null
wait ${smtp_dummy_pid}
notmuch new >/dev/null
}