closing socket
resolves #4