mirror of
https://github.com/go-gitea/gitea
synced 2024-12-25 10:04:27 +00:00
Backport #11850 Signed-off-by: Andrew Thornton <art27@cantab.net>
This commit is contained in:
parent
56660c3fd0
commit
6b1e5f7f88
@ -105,7 +105,7 @@ func DBConnStr() (string, error) {
|
|||||||
switch Database.Type {
|
switch Database.Type {
|
||||||
case "mysql":
|
case "mysql":
|
||||||
connType := "tcp"
|
connType := "tcp"
|
||||||
if Database.Host[0] == '/' { // looks like a unix socket
|
if len(Database.Host) > 0 && Database.Host[0] == '/' { // looks like a unix socket
|
||||||
connType = "unix"
|
connType = "unix"
|
||||||
}
|
}
|
||||||
tls := Database.SSLMode
|
tls := Database.SSLMode
|
||||||
|
Loading…
Reference in New Issue
Block a user