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

Error counter #613

Closed
wants to merge 2 commits into from
Closed

Conversation

SijmenHuizenga
Copy link
Contributor

@SijmenHuizenga SijmenHuizenga commented Sep 2, 2024

  • New: Add a counter for errors that occur during read/write operations.
  • Change: Only count bytes as 'written' when the bytes were sent without error

Errors are dropped getting dropped here:

cm.c.conn.WriteInterleavedFrame(cm.tcpRTPFrame, cm.tcpBuffer) //nolint:errcheck

and we would like to keep track of errors.

We want to track errors because in some cases, when device network connectivity changes, we see situations where gortsplib client keeps a connection still open, while the gortsplib server has already closed the connection. In these situations all packet writes result in an error. Exposing an error count seems like the simplest solution to detect and act on these situations.

@aler9
Copy link
Member

aler9 commented Dec 14, 2024

Hello, thanks for reporting the fact that connections are being kept open in case of write errors. However, in TCP, write errors are fatal, they shouldn't be counted but they should trigger the shutdown mechanism exactly like read errors are.

Such trigger is implemented in #655.

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.

2 participants