ovs-appctl: Close the connection during error.
authorGurucharan Shetty <gshetty@nicira.com>
Thu, 27 Mar 2014 22:40:25 +0000 (15:40 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Fri, 28 Mar 2014 17:53:32 +0000 (10:53 -0700)
When we send a wrong command to a Open vSwitch daemon, it returns
an error. In that case, close the connection to the daemon.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
utilities/ovs-appctl.c

index 9fd0234..c6a7fd4 100644 (file)
@@ -63,6 +63,7 @@ main(int argc, char *argv[])
     }
 
     if (cmd_error) {
+        jsonrpc_close(client);
         fputs(cmd_error, stderr);
         ovs_error(0, "%s: server returned an error", target);
         exit(2);