Commit Diff


commit - 8b0a506230428aaacefd78995955e80f058d9c9d
commit + 182b48dc821a0a4cf7bbcfcdf5f9d376136fd7e6
blob - f1f81fb14b30948b989307846bb4992080644f53
blob + 46b1580bded14c39a8f459de78093768df1ec8b5
--- kamid/client.c
+++ kamid/client.c
@@ -555,8 +555,10 @@ parse_message(const uint8_t *data, size_t len, struct 
 	return;
 
 err:
-	/* TODO: send a proper message to terminate the connection. */
-	fatalx("got invalid message");
+	log_warnx("got invalid message: (%d, %d, %d)",
+	    hdr->len, hdr->type, hdr->tag);
+	client_send_listener(IMSG_CLOSE, NULL, 0);
+	client_shutdown();
 }
 
 static void