We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0c80156 commit e8b746bCopy full SHA for e8b746b
internal/servers/rtsp/session.go
@@ -102,10 +102,9 @@ func (s *session) initialize() {
102
}
103
104
// Close closes a Session.
105
+// this is not always called, so things that need to be released
106
+// must go in onClose().
107
func (s *session) Close() {
- s.discardedFrames.Stop()
- s.decodeErrors.Stop()
108
- s.packetsLost.Stop()
109
s.rsession.Close()
110
111
@@ -136,6 +135,10 @@ func (s *session) onClose(err error) {
136
135
s.path = nil
137
s.stream = nil
138
+ s.discardedFrames.Stop()
139
+ s.decodeErrors.Stop()
140
+ s.packetsLost.Stop()
141
+
142
s.Log(logger.Info, "destroyed: %v", err)
143
144
0 commit comments