Erik Schanze - 2011-07-10

Added some close() calls for socket