Fix: slave node cannot transfer files to other slave node

This commit is contained in:
HFO4
2021-11-30 19:26:07 +08:00
parent 7ea72cf364
commit af4d9767c2
2 changed files with 7 additions and 10 deletions

View File

@ -247,9 +247,6 @@ func (fs *FileSystem) SwitchToSlaveHandler(node cluster.Node) {
// SwitchToShadowHandler 将负责上传的 Handler 切换为从机节点转存使用的影子处理器
func (fs *FileSystem) SwitchToShadowHandler(master cluster.Node, masterURL, masterID string) {
switch fs.Policy.Type {
case "remote":
fs.Policy.Type = "local"
fs.DispatchHandler()
case "local":
fs.Policy.Type = "remote"
fs.Policy.Server = masterURL