Skip to content

Commit 4785f7a

Browse files
authored
fix: include shadow port in local database check (#4284)
1 parent a250719 commit 4785f7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/utils/connect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,5 +182,5 @@ func ConnectByConfig(ctx context.Context, config pgconn.Config, options ...func(
182182
}
183183

184184
func IsLocalDatabase(config pgconn.Config) bool {
185-
return config.Host == Config.Hostname && config.Port == Config.Db.Port
185+
return config.Host == Config.Hostname && (config.Port == Config.Db.Port || config.Port == Config.Db.ShadowPort)
186186
}

0 commit comments

Comments
 (0)