Browse Source

Send port number as a string on reconnect as most clients will be expecting it

master
Con Kolivas 10 years ago
parent
commit
fd73ebe3ae
  1. 7
      src/stratifier.c

7
src/stratifier.c

@ -1512,11 +1512,8 @@ static void reconnect_clients(sdata_t *sdata, const char *cmd)
if (port) if (port)
url = strsep(&port, ","); url = strsep(&port, ",");
if (url && port) { if (url && port) {
int port_no; JSON_CPACK(json_msg, "{sosss[ssi]}", "id", json_null(), "method", "client.reconnect",
"params", url, port, 0);
port_no = strtol(port, NULL, 10);
JSON_CPACK(json_msg, "{sosss[sii]}", "id", json_null(), "method", "client.reconnect",
"params", url, port_no, 0);
} else } else
JSON_CPACK(json_msg, "{sosss[]}", "id", json_null(), "method", "client.reconnect", JSON_CPACK(json_msg, "{sosss[]}", "id", json_null(), "method", "client.reconnect",
"params"); "params");

Loading…
Cancel
Save