diff --git a/devtools/devtools-backend/include/tunnel/ws/web_socket_channel.h b/devtools/devtools-backend/include/tunnel/ws/web_socket_channel.h index d5e14480924..8e244bd3b58 100644 --- a/devtools/devtools-backend/include/tunnel/ws/web_socket_channel.h +++ b/devtools/devtools-backend/include/tunnel/ws/web_socket_channel.h @@ -60,7 +60,7 @@ class WebSocketChannel : public hippy::devtools::NetChannel, public std::enable_ void HandleSocketConnectOpen(const websocketpp::connection_hdl& handle, ReconnectHandler reconnect_handler); void HandleSocketConnectMessage(const websocketpp::connection_hdl& handle, const WSMessagePtr& message_ptr); void HandleSocketConnectClose(const websocketpp::connection_hdl& handle); - void attempt_reconnect(); + void AttemptReconnect(); WSClient ws_client_; websocketpp::connection_hdl connection_hdl_; diff --git a/devtools/devtools-backend/src/tunnel/ws/web_socket_channel.cc b/devtools/devtools-backend/src/tunnel/ws/web_socket_channel.cc index 377c891e133..33a06355afb 100644 --- a/devtools/devtools-backend/src/tunnel/ws/web_socket_channel.cc +++ b/devtools/devtools-backend/src/tunnel/ws/web_socket_channel.cc @@ -168,7 +168,7 @@ void WebSocketChannel::HandleSocketConnectClose(const websocketpp::connection_hd << ", remote close code:" << con->get_remote_close_code() << ", remote close reason:" << con->get_remote_close_reason().c_str(); if (ws_should_reconnect) { - attempt_reconnect(); + AttemptReconnect(); } else { // set handle nullptr when connect fail @@ -177,7 +177,7 @@ void WebSocketChannel::HandleSocketConnectClose(const websocketpp::connection_hd } } -void WebSocketChannel::attempt_reconnect() { +void WebSocketChannel::AttemptReconnect() { ws_reconnect_attempts++; if (ws_reconnect_attempts < MAX_RECONNECT_ATTEMPTS) { FOOTSTONE_DLOG(INFO) << "Attempting to reconnect (" << ws_reconnect_attempts << "/" diff --git a/devtools/devtools-integration/native/include/devtools/devtools_data_source.h b/devtools/devtools-integration/native/include/devtools/devtools_data_source.h index 3e45bc40d4b..67a6c79819d 100644 --- a/devtools/devtools-integration/native/include/devtools/devtools_data_source.h +++ b/devtools/devtools-integration/native/include/devtools/devtools_data_source.h @@ -51,7 +51,7 @@ class DevtoolsDataSource : public std::enable_shared_from_this worker_manager); + void CreateDevtoolsService(const std::string& ws_url, std::shared_ptr worker_manager); /** * @brief bind dom, so that devtools can access and collect data */ diff --git a/devtools/devtools-integration/native/src/devtools_data_source.cc b/devtools/devtools-integration/native/src/devtools_data_source.cc index 3effdb63c27..03b72d63ee0 100644 --- a/devtools/devtools-integration/native/src/devtools_data_source.cc +++ b/devtools/devtools-integration/native/src/devtools_data_source.cc @@ -43,7 +43,7 @@ using StringViewUtils = footstone::stringview::StringViewUtils; static std::atomic global_devtools_data_key{1}; footstone::utils::PersistentObjectMap> devtools_data_map; -void DevtoolsDataSource::create_devtools_service(const std::string& ws_url, +void DevtoolsDataSource::CreateDevtoolsService(const std::string& ws_url, std::shared_ptr worker_manager) { hippy::devtools::DevtoolsConfig devtools_config; devtools_config.framework = hippy::devtools::Framework::kHippy; diff --git a/framework/ios/base/executors/HippyJSExecutor.mm b/framework/ios/base/executors/HippyJSExecutor.mm index 7ef23ff463c..6245d2422b2 100644 --- a/framework/ios/base/executors/HippyJSExecutor.mm +++ b/framework/ios/base/executors/HippyJSExecutor.mm @@ -195,7 +195,7 @@ - (void)setup { if (wsURL.length > 0) { auto workerManager = std::make_shared(1); auto devtools_data_source = std::make_shared(); - devtools_data_source->create_devtools_service([wsURL UTF8String], workerManager); + devtools_data_source->CreateDevtoolsService([wsURL UTF8String], workerManager); self.pScope->SetDevtoolsDataSource(devtools_data_source); } }