Skip to content

Commit

Permalink
fix(devtools): make function name uppercase
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyunong committed Nov 21, 2024
1 parent 64ad4e7 commit 38ac583
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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_;
Expand Down
4 changes: 2 additions & 2 deletions devtools/devtools-backend/src/tunnel/ws/web_socket_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 << "/"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class DevtoolsDataSource : public std::enable_shared_from_this<hippy::devtools::
* @param ws_url websocket url, if empty then use other tunnel
* @param worker_manager worker thread for devtools
*/
void create_devtools_service(const std::string& ws_url, std::shared_ptr<footstone::WorkerManager> worker_manager);
void CreateDevtoolsService(const std::string& ws_url, std::shared_ptr<footstone::WorkerManager> worker_manager);
/**
* @brief bind dom, so that devtools can access and collect data
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ using StringViewUtils = footstone::stringview::StringViewUtils;
static std::atomic<uint32_t> global_devtools_data_key{1};
footstone::utils::PersistentObjectMap<uint32_t, std::shared_ptr<DevtoolsDataSource>> devtools_data_map;

void DevtoolsDataSource::create_devtools_service(const std::string& ws_url,
void DevtoolsDataSource::CreateDevtoolsService(const std::string& ws_url,
std::shared_ptr<footstone::WorkerManager> worker_manager) {
hippy::devtools::DevtoolsConfig devtools_config;
devtools_config.framework = hippy::devtools::Framework::kHippy;
Expand Down
2 changes: 1 addition & 1 deletion framework/ios/base/executors/HippyJSExecutor.mm
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ - (void)setup {
if (wsURL.length > 0) {
auto workerManager = std::make_shared<footstone::WorkerManager>(1);
auto devtools_data_source = std::make_shared<hippy::devtools::DevtoolsDataSource>();
devtools_data_source->create_devtools_service([wsURL UTF8String], workerManager);
devtools_data_source->CreateDevtoolsService([wsURL UTF8String], workerManager);
self.pScope->SetDevtoolsDataSource(devtools_data_source);
}
}
Expand Down

0 comments on commit 38ac583

Please sign in to comment.