Skip to content

Commit

Permalink
Default MSSQL port 0 to allow automatic detection by default (#11642) (
Browse files Browse the repository at this point in the history
…#11673)

Backport #11642

Fix #11633

Signed-off-by: Andrew Thornton <[email protected]>
  • Loading branch information
zeripath committed May 29, 2020
1 parent 42f0769 commit 5911e12
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/setting/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 5911e12

Please sign in to comment.