Skip to content

Commit 2be2b30

Browse files
author
artem-kh
committed
feat grpc: fix customization of the response code in congestion-control
commit_hash:8b27627ac5f14dff3a4b2d42df6a97d10e0b38e8
1 parent c68ed5c commit 2be2b30

File tree

1 file changed

+1
-1
lines changed
  • grpc/src/ugrpc/server/middlewares/congestion_control

1 file changed

+1
-1
lines changed

grpc/src/ugrpc/server/middlewares/congestion_control/component.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Settings Parse(const yaml_config::YamlConfig& config, formats::parse::To<Setting
2121
auto reject_status_code = config["grpc-status-code"].As<std::optional<std::string>>();
2222
if (reject_status_code) {
2323
settings.reject_status_code = ugrpc::StatusCodeFromString(*reject_status_code);
24-
if (settings.reject_status_code != grpc::StatusCode::OK) {
24+
if (settings.reject_status_code == grpc::StatusCode::OK) {
2525
throw std::invalid_argument("grpc-status-code must not be OK status");
2626
}
2727
}

0 commit comments

Comments
 (0)