Resolves memory management problems with client_context::socket_ without...

... causing memory leak