Commit f0c0f1a6 authored by David Woodhouse's avatar David Woodhouse Committed by David Woodhouse
Browse files

Bug 785660 - add payload to Ping frames

Some servers seem to close the connection if we send a Ping frame without
any payload. Send a static "libsoup" as payload each time.
parent d6e959bf
......@@ -1816,9 +1816,12 @@ static gboolean
on_queue_ping (gpointer user_data)
{
SoupWebsocketConnection *self = SOUP_WEBSOCKET_CONNECTION (user_data);
static const char ping_payload[] = "libsoup";
g_debug ("sending ping message");
send_message (self, SOUP_WEBSOCKET_QUEUE_NORMAL, 0x09, NULL, 0);
send_message (self, SOUP_WEBSOCKET_QUEUE_NORMAL, 0x09,
(guint8 *) ping_payload, strlen(ping_payload));
return G_SOURCE_CONTINUE;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment