From 1fe011b5fb5b3dc862046b154c9827b94455da99 Mon Sep 17 00:00:00 2001 From: scruzin Date: Mon, 7 Jan 2019 21:58:19 +1030 Subject: [PATCH] Reinitialize *s in close(). --- rtmp/session.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtmp/session.go b/rtmp/session.go index bac165e6..6f059904 100644 --- a/rtmp/session.go +++ b/rtmp/session.go @@ -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 }