Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

router statistics - filter out gxs tunnels from file tunnels #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

RetroPooh
Copy link
Contributor

No description provided.

@defnax
Copy link
Contributor

defnax commented Jul 18, 2023

@csoler

@csoler
Copy link
Contributor

csoler commented Jul 18, 2023

When GXS tunnels are opened locally as client, then RsGxsNetTunnelService::mHandledHashes will contain the hash for the corresponding group_id. However, tunnels that start elsewhere will not show up here. So it all depends what this change is used for, but it will not differentiate FT tunnels to other tunnels in every case.

@@ -1467,6 +1467,10 @@ void RsGxsNetTunnelService::getStatistics(
bias = mRandomBias ;
}

bool RsGxsNetTunnelService::isGXSHash(RsFileHash hash) const
{
return mHandledHashes.find(hash) != mHandledHashes.end();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A mutex is missing here as you access a std::map. But having a mutex here would likely cause a deadlock randomly since you call this function from p3turtle and p3turtle is always locked after GXS tunnel and not the reverse.

@defnax
Copy link
Contributor

defnax commented Dec 7, 2023

@RetroPooh no fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants