Well you can't close it multiple times, but add a Connection: close header in the sockwrite - the server should close the connection after everything has been read.