summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-05-29 14:28:37 +0100
committerGitHub <noreply@github.com>2020-05-29 16:28:37 +0300
commit5911e129a8bb298338f15c8dd50d26bf7f0be3f0 (patch)
tree019f6953ff36359000f25c1e4b6f3e2493596f1f /modules
parent42f0769e3084d2252cdc8caf3b3b0a0a8f3582d1 (diff)
downloadgitea-5911e129a8bb298338f15c8dd50d26bf7f0be3f0.tar.gz
gitea-5911e129a8bb298338f15c8dd50d26bf7f0be3f0.zip
Default MSSQL port 0 to allow automatic detection by default (#11642) (#11673)
Backport #11642 Fix #11633 Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules')
-rw-r--r--modules/setting/database.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/setting/database.go b/modules/setting/database.go
index 85043e8c11..6bfb02ac41 100644
--- a/modules/setting/database.go
+++ b/modules/setting/database.go
@@ -163,7 +163,7 @@ func getPostgreSQLConnectionString(dbHost, dbUser, dbPasswd, dbName, dbParam, db
// ParseMSSQLHostPort splits the host into host and port
func ParseMSSQLHostPort(info string) (string, string) {
- host, port := "127.0.0.1", "1433"
+ host, port := "127.0.0.1", "0"
if strings.Contains(info, ":") {
host = strings.Split(info, ":")[0]
port = strings.Split(info, ":")[1]