Reinitialize *s in close().

This commit is contained in:
scruzin 2019-01-07 21:58:19 +10:30
parent 04679e4757
commit 1fe011b5fb
1 changed files with 2 additions and 2 deletions

View File

@ -145,11 +145,11 @@ func (s *Session) close() {
}
s.link.conn.Close()
}
s = &Session{}
*s = Session{}
}
// Write writes a frame (flv tag) to the rtmp connection.
func (s *Session) Write(data []byte) (int, error) {
//func (s *Session) Write(data []byte) (int, error) {
if !s.isConnected() {
return 0, errNotConnected
}