Skip to content

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.

@aler9 aler9 closed this Dec 14, 2024
aler9 added a commit that referenced this pull request Dec 14, 2024
aler9 added a commit that referenced this pull request Dec 14, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants