Skip to content

Commit

Permalink
Merge branch 'release-3.6.0' into release-3.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
JimmyShi22 authored Jan 27, 2024
2 parents f346bc2 + 6f54679 commit bc946b6
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 13 deletions.
7 changes: 4 additions & 3 deletions bcos-boostssl/bcos-boostssl/websocket/WsService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,7 @@ void WsService::stop()
{
if (!m_running)
{
WEBSOCKET_SERVICE(INFO) << LOG_BADGE("stop")
<< LOG_DESC("websocket service has been stopped");
// WEBSOCKET_SERVICE(INFO) << LOG_DESC("websocket service has been stopped");
return;
}
m_running = false;
Expand All @@ -114,6 +113,8 @@ void WsService::stop()
{
m_ioservicePool->stop();
}
m_taskGroup.cancel();
m_taskGroup.wait();

// cancel reconnect task
if (m_reconnect)
Expand All @@ -132,7 +133,7 @@ void WsService::stop()
m_httpServer->stop();
}

WEBSOCKET_SERVICE(INFO) << LOG_BADGE("stop") << LOG_DESC("stop websocket service successfully");
// WEBSOCKET_SERVICE(INFO) << LOG_DESC("stop websocket service successfully");
}


Expand Down
5 changes: 2 additions & 3 deletions bcos-sdk/bcos-cpp-sdk/amop/AMOP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,21 @@ void AMOP::start()
if (m_service)
{ // start websocket service
m_service->start();
AMOP_CLIENT(INFO) << LOG_BADGE("start") << LOG_DESC("start amop");
}
else
{
AMOP_CLIENT(WARNING) << LOG_BADGE("start")
<< LOG_DESC("websocket service is not uninitialized");
}

AMOP_CLIENT(INFO) << LOG_BADGE("start") << LOG_DESC("start amop");
}
void AMOP::stop()
{
if (m_service)
{
// AMOP_CLIENT(INFO) << LOG_BADGE("stop") << LOG_DESC("stop amop");
m_service->stop();
}
AMOP_CLIENT(INFO) << LOG_BADGE("stop") << LOG_DESC("stop amop");
}

// subscribe topics
Expand Down
5 changes: 2 additions & 3 deletions bcos-sdk/bcos-cpp-sdk/event/EventSub.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ void EventSub::stop()
{
if (!m_running)
{
EVENT_SUB(INFO) << LOG_BADGE("stop") << LOG_DESC("event sub is not running");
// EVENT_SUB(INFO) << LOG_BADGE("stop") << LOG_DESC("event sub is not running");
return;
}

Expand All @@ -75,10 +75,9 @@ void EventSub::stop()
}
if (m_service)
{
// EVENT_SUB(INFO) << LOG_BADGE("stop") << LOG_DESC("stop event sub successfully");
m_service->stop();
}

EVENT_SUB(INFO) << LOG_BADGE("stop") << LOG_DESC("stop event sub successfully");
}

void EventSub::doLoop()
Expand Down
2 changes: 1 addition & 1 deletion bcos-sdk/bcos-cpp-sdk/event/EventSub.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class EventSub : public EventSubInterface
~EventSub() override
{
stop();
EVENT_SUB(INFO) << LOG_KV("[DELOBJ][EventSub]", this);
// EVENT_SUB(INFO) << LOG_KV("[DELOBJ][EventSub]", this);
}

public:
Expand Down
4 changes: 3 additions & 1 deletion bcos-sdk/bcos-cpp-sdk/event/EventSubTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ class EventSubTask
public:
using Ptr = std::shared_ptr<EventSubTask>;
EventSubTask() { EVENT_TASK(DEBUG) << LOG_KV("[NEWOBJ][EventSubTask]", this); }
~EventSubTask() { EVENT_TASK(DEBUG) << LOG_KV("[DELOBJ][EventSubTask]", this); }
~EventSubTask()
{ // EVENT_TASK(DEBUG) << LOG_KV("[DELOBJ][EventSubTask]", this);
}

public:
void setSession(std::shared_ptr<bcos::boostssl::ws::WsSession> _session)
Expand Down
2 changes: 1 addition & 1 deletion bcos-sdk/bcos-cpp-sdk/rpc/JsonRpcImpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ void JsonRpcImpl::stop()
{
if (m_service)
{
// RPCIMPL_LOG(INFO) << LOG_BADGE("stop") << LOG_DESC("stop rpc");
m_service->stop();
}
RPCIMPL_LOG(INFO) << LOG_BADGE("stop") << LOG_DESC("stop rpc");
}

void JsonRpcImpl::genericMethod(const std::string& _data, RespFunc _respFunc)
Expand Down
2 changes: 1 addition & 1 deletion bcos-sdk/bcos-cpp-sdk/rpc/JsonRpcImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class JsonRpcImpl : public JsonRpcInterface, public std::enable_shared_from_this
~JsonRpcImpl() override
{
stop();
BCOS_LOG(INFO) << LOG_KV("[DELOBJ][JsonRpcImpl]", this);
// BCOS_LOG(INFO) << LOG_KV("[DELOBJ][JsonRpcImpl]", this);
}

public:
Expand Down

0 comments on commit bc946b6

Please sign in to comment.