Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/origin/fierce_fermion_6.2RC' in…
Browse files Browse the repository at this point in the history
…to testnet
  • Loading branch information
anatolse committed Dec 10, 2021
2 parents d641ead + 25c3bdf commit 2a2fc13
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions websocket/sessions.h
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ namespace beam
{
public:
explicit
DetectSession(tcp::socket&& socket, ssl::context& ctx, SafeReactor::Ptr reactor, HandlerCreator creator)
DetectSession(tcp::socket&& socket, ssl::context* ctx, SafeReactor::Ptr reactor, HandlerCreator creator)
: _stream(std::move(socket))
, _ctx(ctx)
, _reactor(reactor)
Expand Down Expand Up @@ -462,11 +462,14 @@ namespace beam

if (result)
{
if (_ctx == nullptr)
return fail(ec, "tls is turned off");

// Launch SSL session
std::make_shared<SecureWebsocketSession>(
std::move(_stream),
std::move(_buffer),
_ctx,
*_ctx,
_reactor,
_creator)->run();
return;
Expand All @@ -481,7 +484,7 @@ namespace beam
}
private:
beast::tcp_stream _stream;
ssl::context& _ctx;
ssl::context* _ctx;
boost::beast::multi_buffer _buffer;
SafeReactor::Ptr _reactor;
HandlerCreator _creator;
Expand Down
2 changes: 1 addition & 1 deletion websocket/websocket_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ namespace beam
if (m_allowedOrigin.empty())
{
// Create the Detect Session and run it
std::make_shared<DetectSession>(std::move(m_socket), *m_tlsContext, m_reactor, m_handlerCreator)->run();
std::make_shared<DetectSession>(std::move(m_socket), m_tlsContext, m_reactor, m_handlerCreator)->run();
}
else
{
Expand Down

0 comments on commit 2a2fc13

Please sign in to comment.