close socket after finished

otherwise Chrome will run out of file descriptors