core: stop catching exceptions from NameResolver.start() (#5452)

It's not supposed to throw. Any exception from it should be considered
a bug and deserves a panic.
This commit is contained in:
Kun Zhang 2019-03-08 15:21:36 -08:00 committed by GitHub
parent e5e01b5169
commit f095926d2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 6 deletions

View File

@ -363,12 +363,8 @@ final class ManagedChannelImpl extends ManagedChannel implements
this.lbHelper = lbHelper;
NameResolverListenerImpl listener = new NameResolverListenerImpl(lbHelper, nameResolver);
try {
nameResolver.start(listener);
nameResolverStarted = true;
} catch (Throwable t) {
listener.onError(Status.fromThrowable(t));
}
nameResolver.start(listener);
nameResolverStarted = true;
}
// Must be run from syncContext