Permalink
Browse files

trying to close off more sockets

there are probably still some leaks around
  • Loading branch information...
1 parent 9763714 commit 669f64ecd16a1e6a7b0de31e16f13a84076006de @pilif committed Dec 6, 2010
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/tempalias_smtp.js
View
@@ -33,13 +33,19 @@ server.addListener('connect', function(args){
session.client.quit();
delete(session.client);
}
+ session.socket.end();
+ delete(session.socket);
});
});
if (config.smtp.rbls){
server.addListener('connect', function(args){
require('rbl').check(args[0], config.smtp.rbls, function(found){
if (found){
- args[2].socket.write("500 RBL check failed\r\n");
+ try{
+ args[2].socket.write("500 RBL check failed\r\n");
+ }catch(e){
+ sys.debug("Exception while writing to client after closing socket"+e);
+ }
args[2].socket.end();
}else{
args[1].emitSuccess();

0 comments on commit 669f64e

Please sign in to comment.