server closes the socket too, no memory leak, maybe
where was the merge conflict