1 Star 0 Fork 40

dengkx/third_party_grpc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
src_core_lib_iomgr.patch 2.96 KB
一键复制 编辑 原始数据 按行查看 历史
wenlong_12 提交于 2023-04-23 17:21 . grpc版本升级到1.41.1
diff -Naur grpc-1.41.1/src/core/lib/iomgr/event_engine/resolver.cc third_party_grpc_sxy/src/core/lib/iomgr/event_engine/resolver.cc
--- grpc-1.41.1/src/core/lib/iomgr/event_engine/resolver.cc 2021-10-20 04:14:40.000000000 +0800
+++ third_party_grpc_sxy/src/core/lib/iomgr/event_engine/resolver.cc 2023-04-20 14:24:54.000000000 +0800
@@ -80,12 +80,13 @@
grpc_closure* on_done,
grpc_resolved_addresses** addresses) {
auto dns_resolver = grpc_iomgr_event_engine()->GetDNSResolver();
- if (!dns_resolver.ok()) {
- grpc_core::ExecCtx::Run(DEBUG_LOCATION, on_done,
- absl_status_to_grpc_error(dns_resolver.status()));
+ if (dns_resolver == nullptr) {
+ grpc_core::ExecCtx::Run(
+ DEBUG_LOCATION, on_done,
+ GRPC_ERROR_CREATE_FROM_STATIC_STRING("Failed to get DNS Resolver."));
return;
}
- new DnsRequest(std::move(*dns_resolver), addr, default_port, on_done,
+ new DnsRequest(std::move(dns_resolver), addr, default_port, on_done,
addresses);
}
diff -Naur grpc-1.41.1/src/core/lib/iomgr/event_engine/tcp.cc third_party_grpc_sxy/src/core/lib/iomgr/event_engine/tcp.cc
--- grpc-1.41.1/src/core/lib/iomgr/event_engine/tcp.cc 2021-10-20 04:14:40.000000000 +0800
+++ third_party_grpc_sxy/src/core/lib/iomgr/event_engine/tcp.cc 2023-04-20 14:24:54.000000000 +0800
@@ -175,7 +175,7 @@
EventEngine* event_engine = grpc_iomgr_event_engine();
absl::StatusOr<std::unique_ptr<EventEngine::Listener>> listener =
event_engine->CreateListener(
- [server](std::unique_ptr<EventEngine::Endpoint> ee_endpoint) {
+ [server](std::unique_ptr<EventEngine::Endpoint> ee_endpoint, const SliceAllocator&) {
grpc_core::ExecCtx exec_ctx;
GPR_ASSERT((*server)->on_accept_internal != nullptr);
grpc_event_engine_endpoint* iomgr_endpoint =
@@ -277,16 +277,5 @@
int fd;
};
-grpc_fd* grpc_fd_create(int /* fd */, const char* /* name */,
- bool /* track_err */) {
- return nullptr;
-}
-
-grpc_endpoint* grpc_tcp_client_create_from_fd(
- grpc_fd* /* fd */, const grpc_channel_args* /* channel_args */,
- const char* /* addr_str */, grpc_slice_allocator* slice_allocator) {
- grpc_slice_allocator_destroy(slice_allocator);
- return nullptr;
-}
#endif // GRPC_USE_EVENT_ENGINE
diff -Naur grpc-1.41.1/src/core/lib/iomgr/event_engine/timer.cc third_party_grpc_sxy/src/core/lib/iomgr/event_engine/timer.cc
--- grpc-1.41.1/src/core/lib/iomgr/event_engine/timer.cc 2021-10-20 04:14:40.000000000 +0800
+++ third_party_grpc_sxy/src/core/lib/iomgr/event_engine/timer.cc 2023-04-20 14:24:54.000000000 +0800
@@ -32,7 +32,7 @@
timer->ee_task_handle = grpc_iomgr_event_engine()->RunAt(
grpc_core::ToAbslTime(
grpc_millis_to_timespec(deadline, GPR_CLOCK_REALTIME)),
- GrpcClosureToCallback(closure, GRPC_ERROR_NONE), {});
+ GrpcClosureToCallback(closure, GRPC_ERROR_NONE));
}
void timer_cancel(grpc_timer* timer) {
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/ksllh/third_party_grpc.git
git@gitee.com:ksllh/third_party_grpc.git
ksllh
third_party_grpc
third_party_grpc
master

搜索帮助