diff --git a/Dockerfile b/Dockerfile index 9cdff38..ce984da 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.18.9 +FROM golang:1.21.1 ENV GOPROXY=https://goproxy.cn,https://goproxy.io,direct LABEL maintainer="Kevin Zang" diff --git a/gb28181/mediaserver/conn.go b/gb28181/mediaserver/conn.go index 28e4396..a618252 100644 --- a/gb28181/mediaserver/conn.go +++ b/gb28181/mediaserver/conn.go @@ -56,11 +56,13 @@ func (c *Conn) Serve() (err error) { nazalog.Info("conn close, err:", err) c.conn.Close() - if c.NotifyClose != nil { - c.NotifyClose(c.streamName) - } + if c.check { + if c.NotifyClose != nil { + c.NotifyClose(c.streamName) + } - c.lalServer.DelCustomizePubSession(c.lalSession) + c.lalServer.DelCustomizePubSession(c.lalSession) + } }() nazalog.Info("gb28181 conn, remoteaddr:", c.conn.RemoteAddr().String(), " localaddr:", c.conn.LocalAddr().String())