From 81be97067931b03f30c7b01c0877ed4ad3b76fc6 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Fri, 20 Dec 2019 09:51:21 -0800 Subject: [PATCH] (ws commands) in websocket proxy, disable automatic reconnections + in Dockerfile, use alpine 3.11 --- Dockerfile | 4 ++-- docs/CHANGELOG.md | 4 ++++ ixwebsocket/IXWebSocketVersion.h | 2 +- ws/ws_proxy_server.cpp | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 70a27cc9..e2b19a64 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:edge as build +FROM alpine:3.11 as build RUN apk add --no-cache gcc g++ musl-dev linux-headers cmake openssl-dev RUN apk add --no-cache make @@ -16,7 +16,7 @@ WORKDIR /opt USER app RUN [ "make", "ws_install" ] -FROM alpine:edge as runtime +FROM alpine:3.11 as runtime RUN apk add --no-cache libstdc++ RUN apk add --no-cache strace diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index c42a8abc..41395d1c 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog All notable changes to this project will be documented in this file. +## [7.6.1] - 2019-12-20 + +(ws commands) in websocket proxy, disable automatic reconnections + in Dockerfile, use alpine 3.11 + ## [7.6.0] - 2019-12-19 (cobra) Add TLS options to all cobra commands and classes. Add example to the doc. diff --git a/ixwebsocket/IXWebSocketVersion.h b/ixwebsocket/IXWebSocketVersion.h index 9e6e0941..ba8076d2 100644 --- a/ixwebsocket/IXWebSocketVersion.h +++ b/ixwebsocket/IXWebSocketVersion.h @@ -6,4 +6,4 @@ #pragma once -#define IX_WEBSOCKET_VERSION "7.5.8" +#define IX_WEBSOCKET_VERSION "7.6.1" diff --git a/ws/ws_proxy_server.cpp b/ws/ws_proxy_server.cpp index c576affb..c3431234 100644 --- a/ws/ws_proxy_server.cpp +++ b/ws/ws_proxy_server.cpp @@ -61,7 +61,7 @@ namespace ix // Server connection state->webSocket().setOnMessageCallback([webSocket, state, verbose]( - const WebSocketMessagePtr& msg) { + const WebSocketMessagePtr& msg) { if (msg->type == ix::WebSocketMessageType::Open) { std::cerr << "New connection" << std::endl; @@ -120,6 +120,7 @@ namespace ix std::string url(remoteUrl); url += msg->openInfo.uri; state->webSocket().setUrl(url); + state->webSocket().disableAutomaticReconnection(); state->webSocket().start(); // we should sleep here for a bit until we've established the