Skip to content
New issue

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

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

Already on GitHub? # to your account

str2str does not always detect disconnection when waiting for NTRIP response from caster #458

Open
Jef239 opened this issue Feb 13, 2025 · 0 comments

Comments

@Jef239
Copy link

Jef239 commented Feb 13, 2025

Error in recv_nb procedure. This procedure does select and recv and returns one of three options:

ret>0 - n bytes received
ret<0 - error
ret==0 - nothing received

The arrival of FIN (disconnect) is encoded as a return of -1 with errno==0. However, if errno!=0 before the call, it is not cleared when executing recv_nb. And then the situation is treated as an error, not as a disconnect. If errno was EGAIN, then the disconnect is not detected at all.

I will try to send this bug to rtklibexplorer, but I am not sure that they will accept my patch.

recv_nb.patch

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

No branches or pull requests

1 participant