fix: fix bug in smtp server when exceptions occur

This commit is contained in:
Adam Cooke
2024-03-04 13:55:16 +00:00
parent dbd0e279f5
commit 9dd00f6edd
+2 -4
View File
@@ -147,8 +147,7 @@ module SMTPServer
logger.error line logger.error line
end end
increment_prometheus_counter :postal_smtp_server_exceptions_total, increment_prometheus_counter :postal_smtp_server_exceptions_total,
error: e.class.to_s, labels: { error: e.class.to_s, type: "client-accept" }
type: "client-accept"
begin begin
new_io.close new_io.close
rescue StandardError rescue StandardError
@@ -260,8 +259,7 @@ module SMTPServer
end end
increment_prometheus_counter :postal_smtp_server_exceptions_total, increment_prometheus_counter :postal_smtp_server_exceptions_total,
error: e.class.to_s, labels: { error: e.class.to_s, type: "data" }
type: "data"
# Close all IO and forget this client # Close all IO and forget this client
begin begin