Skip to content

Commit afb1a67

Browse files
committed
Fixed socket releasing.
1 parent 687ebf6 commit afb1a67

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

mail.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,10 +596,12 @@ Message.prototype._send = function(socket, options, autosend) {
596596

597597
socket.on('end', function() {
598598
self.closed = true;
599-
if (!socket) {
600-
socket.end();
599+
600+
if (socket) {
601601
socket.destroy();
602+
socket = null;
602603
}
604+
603605
});
604606

605607
socket.on('data', function(data) {

0 commit comments

Comments
 (0)