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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

SijmenHuizenga
Copy link

@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.

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.

1 participant