Skip to content

Commit

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

Fix go-gitea#11633

Signed-off-by: Andrew Thornton <[email protected]>

Co-authored-by: techknowlogick <[email protected]>
  • Loading branch information
2 people authored and Yohann Delafollye committed Jul 31, 2020
1 parent 371ee8a commit 6ac6461
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 6ac6461

Please sign in to comment.