diff --git a/lib/client-handshake.c b/lib/client-handshake.c index e7b33b64..49a31bca 100644 --- a/lib/client-handshake.c +++ b/lib/client-handshake.c @@ -55,7 +55,7 @@ libwebsocket_client_connect(struct libwebsocket_context *this, /* -1 means just use latest supported */ if (ietf_version_or_minus_one == -1) - ietf_version_or_minus_one = 5; + ietf_version_or_minus_one = SPEC_LATEST_SUPPORTED; wsi->ietf_spec_revision = ietf_version_or_minus_one; wsi->name_buffer_pos = 0; diff --git a/lib/private-libwebsockets.h b/lib/private-libwebsockets.h index 493fd221..e876870b 100644 --- a/lib/private-libwebsockets.h +++ b/lib/private-libwebsockets.h @@ -89,6 +89,7 @@ static inline void debug(const char *format, ...) #define MAX_USER_RX_BUFFER 4096 #define MAX_BROADCAST_PAYLOAD 2048 #define LWS_MAX_PROTOCOLS 10 +#define SPEC_LATEST_SUPPORTED 6 #define MAX_WEBSOCKET_04_KEY_LEN 128 #define SYSTEM_RANDOM_FILEPATH "/dev/urandom"