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

RTSP Connection is not released under high traffic conditions #497

Open
GyeongHoKim opened this issue Dec 6, 2024 · 0 comments
Open

RTSP Connection is not released under high traffic conditions #497

GyeongHoKim opened this issue Dec 6, 2024 · 0 comments

Comments

@GyeongHoKim
Copy link

GyeongHoKim commented Dec 6, 2024

Related to #496

Problem

My product is React WebAPP for GIS system, I use RTSPtoWeb as Media Server. My product's users sometimes create & close webrtc players in very short time.
When there are many traffics, I found some of cameras does not release its RTSP Connection with RTSPtoWeb server.
I fixed it and worked well in my product.

gin.Context Is Not Concurrency-Safe

gin.Context is not created each requests. Gin uses sync.Pool. so if there are many traffics, sometimes race condition happens.
you should use Copy method or just store params on new variables.

cCopy := c.Copy()
go func() {
    do something
}()

or

uuid := c.Param("uuid")
channel := c.Param("uuid")
go func() {
    do something
}()
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

No branches or pull requests

1 participant