fix cluster proxy cleanup routing
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
@@ -101,7 +102,7 @@ func (t *Topic) runProxy(hub *Hub) {
|
||||
s.detachSession(t.name)
|
||||
}
|
||||
|
||||
if err := globals.cluster.topicProxyGone(t.tenantID, t.name); err != nil {
|
||||
if err := globals.cluster.topicProxyGone(t.tenantID, t.name); err != nil && !errors.Is(err, errClusterTopicOwnerUnavailable) {
|
||||
logs.Warn.Printf("proxy topic[%s] shutdown: failed to notify master - %s", t.name, err)
|
||||
}
|
||||
|
||||
@@ -164,7 +165,7 @@ func (t *Topic) handleProxyLeaveRequest(msg *ClientComMessage, killTimer *time.T
|
||||
}
|
||||
}
|
||||
|
||||
if err := globals.cluster.routeToTopicMaster(ProxyReqLeave, msg, t.name, msg.sess); err != nil {
|
||||
if err := globals.cluster.routeToTopicMaster(ProxyReqLeave, msg, t.name, msg.sess); err != nil && !errors.Is(err, errClusterTopicOwnerUnavailable) {
|
||||
logs.Warn.Printf("proxy topic[%s]: route leave request from proxy to master failed - %s", t.name, err)
|
||||
}
|
||||
if len(t.sessions) == 0 {
|
||||
|
||||
Reference in New Issue
Block a user