From 23408ae236dcade1e086faae16743321d21489fe Mon Sep 17 00:00:00 2001 From: j3ssie Date: Sun, 11 Oct 2020 14:42:20 +0700 Subject: [PATCH] refactor entire architecture --- core/variables.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/variables.go b/core/variables.go index 116dd9d..b56d908 100644 --- a/core/variables.go +++ b/core/variables.go @@ -479,6 +479,10 @@ func ReplicationJob(input string, sign libs.Signature) ([]libs.Job, error) { if oPort == "" { cloneURL.Host += nPort } else { + // avoid duplicate port here + if strings.Contains(cloneURL.Host, nPort) { + continue + } cloneURL.Host = strings.Replace(cloneURL.Host, fmt.Sprintf(":%s", oPort), nPort, -1) }