refactor(grpc): bind TCP listener before etcd registration to prevent connection issues
- Change tokio-stream dependency to include net feature for TcpListenerStream - Move TCP listener binding before etcd registry initialization in main function - Pass pre-bound TcpListener to gRPC server instead of just SocketAddr - Update gRPC server to use serve_with_incoming with TcpListenerStream - Prevent peers from attempting connections before gRPC server is ready - Ensure proper error handling for TCP binding failures during startup
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ tonic-prost = "0.14"
|
||||
tonic-health = "0.14.6"
|
||||
url = "2.5"
|
||||
etcd-client = { version = "0.18", features = ["tls"] }
|
||||
tokio-stream = "0.1"
|
||||
tokio-stream = { version = "0.1", features = ["net"] }
|
||||
async-nats = "0.49"
|
||||
futures-util = "0.3"
|
||||
utoipa = { version = "5", features = ["uuid","chrono","actix_extras","decimal","macros"]}
|
||||
|
||||
Reference in New Issue
Block a user