diff --git a/server.go b/server.go index c90b8250..304dd29e 100644 --- a/server.go +++ b/server.go @@ -117,12 +117,12 @@ type Server struct { receiverReportPeriod time.Duration closeSessionAfterNoRequestsFor time.Duration + ctx context.Context + ctxCancel func() + wg sync.WaitGroup tcpListener net.Listener udpRTPListener *serverUDPListener udpRTCPListener *serverUDPListener - wg sync.WaitGroup - ctx context.Context - ctxCancel func() sessions map[string]*ServerSession conns map[*ServerConn]struct{} exitError error diff --git a/serverconn.go b/serverconn.go index c94826ad..52e9bdf8 100644 --- a/serverconn.go +++ b/serverconn.go @@ -42,13 +42,13 @@ type readReq struct { // ServerConn is a server-side RTSP connection. type ServerConn struct { - s *Server - nconn net.Conn - ctx context.Context - ctxCancel func() - br *bufio.Reader - bw *bufio.Writer + s *Server + nconn net.Conn + ctx context.Context + ctxCancel func() + br *bufio.Reader + bw *bufio.Writer sessions map[string]*ServerSession tcpFrameSetEnabled bool // tcp tcpFrameEnabled bool // tcp