Skip to content

Commit

Permalink
[ntcore] Enable uv/WS debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterJohnson committed Jan 20, 2024
1 parent 5c8d4a4 commit 068dd5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ntcore/src/main/native/cpp/NetworkClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ void NetworkClient::HandleLocal() {
}

void NetworkClient::TcpConnected(uv::Tcp& tcp) {
tcp.SetLogger(&m_logger);
tcp.SetNoDelay(true);
// Start the WS client
if (m_logger.min_level() >= wpi::WPI_LOG_DEBUG4) {
Expand Down
1 change: 1 addition & 0 deletions ntcore/src/main/native/cpp/NetworkServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ void NetworkServer::Init() {
if (!tcp) {
return;
}
tcp->SetLogger(&m_logger);
tcp->error.connect([logger = &m_logger](uv::Error err) {
WPI_INFO(*logger, "NT4 socket error: {}", err.str());
});
Expand Down

0 comments on commit 068dd5f

Please sign in to comment.