Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import static com.hedera.pbj.runtime.grpc.ServiceInterface.RequestOptions.APPLICATION_GRPC_JSON;
import static com.hedera.pbj.runtime.grpc.ServiceInterface.RequestOptions.APPLICATION_GRPC_PROTO;
import static java.lang.System.Logger.Level.DEBUG;
import static java.lang.System.Logger.Level.ERROR;
import static java.lang.System.Logger.Level.INFO;
import static java.util.Collections.emptyList;
import static java.util.Objects.requireNonNull;

Expand Down Expand Up @@ -306,9 +306,14 @@ public void init() {
error();
} catch (final Exception unknown) {
route.failedUnknownRequestCounter().increment();
LOGGER.log(ERROR, "Failed to initialize grpc protocol handler", unknown);
new TrailerOnlyBuilder().grpcStatus(GrpcStatus.UNKNOWN).send();
error();
LOGGER.log(INFO, "Failed to initialize grpc protocol handler", unknown);
// If the socket is closed, then sending the trailers would fail too.
// But we still want to call error() so that we clean up resources:
try {
new TrailerOnlyBuilder().grpcStatus(GrpcStatus.UNKNOWN).send();
} finally {
error();
}
}
}

Expand Down
Loading