Fix control channel shutdown in case of errors.

When there are connection errors, like host is down, when
establishing the control channel connection, the control io
channel was not being shutdown. This will cause future
connections to fail.

Bug: 3372526
Change-Id: Iffa78a27c2d6998f553f716e8133f67b915f56fd
diff --git a/input/device.c b/input/device.c
index 30bd91e..63de328 100644
--- a/input/device.c
+++ b/input/device.c
@@ -876,6 +876,7 @@
 		error("%s", conn_err->message);
 		reply = connection_attempt_failed(iconn->pending_connect,
 							conn_err->message);
+		g_io_channel_shutdown(chan, TRUE, NULL);
 		goto failed;
 	}