Browse code

BM-12929 Fix: lmtp disposes message

David Phan authored on 08/03/2018 11:16:21
Showing 1 changed files
... ...
@@ -128,14 +128,15 @@ public class LmtpFiltersVerticle extends Verticle {
128 128
 			}
129 129
 		}
130 130
 
131
-		msg.dispose();
132 131
 		// no body modification
133 132
 		if (!modified) {
134 133
 			// return original body
134
+			msg.dispose();
135 135
 			return body;
136 136
 		} else {
137 137
 			logger.debug("mail body has been modified");
138 138
 			ByteBuf data = parseFilteredMessage(filtered);
139
+			msg.dispose();
139 140
 			return new MailMessage(body.getEnvelope(), data);
140 141
 		}
141 142