We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6cebf6f commit 8ce83dcCopy full SHA for 8ce83dc
include/dpp/cluster.h
@@ -273,6 +273,7 @@ class DPP_EXPORT cluster {
273
*
274
* @param mode websocket protocol to use, either ws_json or ws_etf.
275
* @return cluster& Reference to self for chaining.
276
+ * @throw dpp::logic_exception If called after the cluster is started (this is not supported)
277
*/
278
cluster& set_websocket_protocol(websocket_protocol_t mode);
279
src/dpp/cluster.cpp
@@ -119,6 +119,9 @@ request_queue* cluster::get_raw_rest() {
119
}
120
121
cluster& cluster::set_websocket_protocol(websocket_protocol_t mode) {
122
+ if (start_time > 0) {
123
+ throw dpp::logic_exception("Cannot change websocket protocol on a started cluster!");
124
+ }
125
ws_mode = mode;
126
return *this;
127
0 commit comments