mike-jumper commented on a change in pull request #228:
URL: https://github.com/apache/guacamole-server/pull/228#discussion_r446699332
##########
File path: src/libguac/protocol.c
##########
@@ -961,6 +975,50 @@ int guac_protocol_send_rect(guac_socket* socket,
}
+/**
+ * Sends the "required" instruction on the given socket, looping
+ * through all the items provided in the NULL-terminated array,
+ * and closing out the instruction. Returns zero on success, or
+ * non-zero on error.
+ *
+ * @param socket
+ * The socket on which to write the instruction.
+ *
+ * @param required
+ * The NULL-terminated array of required parameters to send
+ * to the client.
+ *
+ * @return
+ * Zero if successful, non-zero on error.
+ */
+static int __guac_protocol_send_required(guac_socket* socket,
+ const char** required) {
+
+ // The socket should be kept alive while waiting for user response.
+ guac_socket_require_keep_alive(socket);
Review comment:
In fact ... given that there are definitely cases where a `guac_socket`
does not need a `nop` ping (the tee socket writing screen recordings to a file,
for example), perhaps the keep-alive should only be set by default where it is
known to be correct, like right after initialization of the `guac_client` via
`guac_client_load_plugin()` succeeds within guacd? (Or as part of documented
behavior of `guac_client_load_plugin()`?)
Even assuming that the broadcast socket needs a keep-alive ping might be
overly presumptuous on the utility of a socket that broadcasts to all users.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]