Skip to content

Commit 45cc5d8

Browse files
committed
fix panic during create integration tables when API_LISTEN doesn't contain ":" character, fix #790
1 parent b363d94 commit 45cc5d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/server/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1496,7 +1496,7 @@ func (api *APIServer) CreateIntegrationTables() error {
14961496
defer ch.Close()
14971497
port := "80"
14981498
if strings.Contains(api.config.API.ListenAddr, ":") {
1499-
port = api.config.API.ListenAddr[strings.Index(api.config.API.ListenAddr, ":"):]
1499+
port = api.config.API.ListenAddr[strings.Index(api.config.API.ListenAddr, ":")+1:]
15001500
}
15011501
auth := ""
15021502
if api.config.API.Username != "" || api.config.API.Password != "" {

0 commit comments

Comments
 (0)