Skip to content

Commit 222be51

Browse files
committed
fatal if the resolver cannot initialize
1 parent f6818d9 commit 222be51

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

go/vt/vtgateproxy/vtgateproxy.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,16 @@ func Init() {
218218
return append(opts, grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"loadBalancingConfig": [{"%s":{}}]}`, *balancerType))), nil
219219
})
220220

221-
RegisterJSONGateResolver(
221+
_, err := RegisterJSONGateResolver(
222222
*vtgateHostsFile,
223223
*addressField,
224224
*portField,
225225
*poolTypeField,
226226
*affinityField,
227227
*affinityValue,
228228
)
229+
230+
if err != nil {
231+
log.Fatalf("error initializing resolver: %v", err)
232+
}
229233
}

0 commit comments

Comments
 (0)