fix: avoid auth puller

This commit is contained in:
langhuihui
2024-03-28 17:24:39 +08:00
parent f677b9885c
commit 6e3c86d012
2 changed files with 15 additions and 8 deletions

2
io.go
View File

@@ -214,7 +214,7 @@ func (io *IO) receive(streamPath string, specific common.IIO) error {
io.Info("publish", zap.String("ptr", fmt.Sprintf("%p", iPub)))
s.pubLocker.Lock()
defer s.pubLocker.Unlock()
if config.Global.EnableAuth {
if _, isPuller := specific.(IPuller); config.Global.EnableAuth && !isPuller {
onAuthPub := OnAuthPub
if auth, ok := specific.(AuthPub); ok {
onAuthPub = auth.OnAuth