Closing all open streams in GRPC-Java from client end cleanly -
i using grpc-java 1.1.2. in active grpc session, have few bidirectional streams open. there way clean them client end when client disconnecting? when try disconnect, run following fixed number of times , disconnect can see following error on server side (not sure if caused issue though):
disconnect client
while (!channel.awaittermination(3, timeunit.seconds)) { // check upper bound , break if } channel.shutdown().awaittermination(3, timeunit.seconds); error on server
e0414 11:26:48.787276000 140735121084416 ssl_transport_security.c:439] ssl_read returned 0 unexpectedly. e0414 11:26:48.787345000 140735121084416 secure_endpoint.c:185] decryption error: tsi_internal_error
if use shutdownnow() more aggressively shutdown rpc streams have. also, need call shutdown() or shutdownnow() before calling awaittermination().
that said, better solution end rpcs gracefully before closing channel.
Comments
Post a Comment