|
|
@ -161,7 +161,15 @@ module GRPC |
|
|
|
count += 1 |
|
|
|
count += 1 |
|
|
|
payload = @marshal.call(req) |
|
|
|
payload = @marshal.call(req) |
|
|
|
# Fails if status already received |
|
|
|
# Fails if status already received |
|
|
|
@call.run_batch(SEND_MESSAGE => payload) |
|
|
|
begin |
|
|
|
|
|
|
|
@call.run_batch(SEND_MESSAGE => payload) |
|
|
|
|
|
|
|
rescue GRPC::Core::CallError => e |
|
|
|
|
|
|
|
# This is almost definitely caused by a status arriving while still |
|
|
|
|
|
|
|
# writing. Don't re-throw the error |
|
|
|
|
|
|
|
GRPC.logger.warn('bidi-write-loop: ended with error') |
|
|
|
|
|
|
|
GRPC.logger.warn(e) |
|
|
|
|
|
|
|
break |
|
|
|
|
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
GRPC.logger.debug("bidi-write-loop: #{count} writes done") |
|
|
|
GRPC.logger.debug("bidi-write-loop: #{count} writes done") |
|
|
|
if is_client |
|
|
|
if is_client |
|
|
@ -173,14 +181,6 @@ module GRPC |
|
|
|
finished |
|
|
|
finished |
|
|
|
end |
|
|
|
end |
|
|
|
GRPC.logger.debug('bidi-write-loop: finished') |
|
|
|
GRPC.logger.debug('bidi-write-loop: finished') |
|
|
|
rescue GRPC::Core::CallError => e |
|
|
|
|
|
|
|
# This is almost definitely caused by a status arriving while still |
|
|
|
|
|
|
|
# writing. Don't re-throw the error |
|
|
|
|
|
|
|
GRPC.logger.warn('bidi-write-loop: ended with error') |
|
|
|
|
|
|
|
GRPC.logger.warn(e) |
|
|
|
|
|
|
|
notify_done |
|
|
|
|
|
|
|
@writes_complete = true |
|
|
|
|
|
|
|
finished |
|
|
|
|
|
|
|
rescue StandardError => e |
|
|
|
rescue StandardError => e |
|
|
|
GRPC.logger.warn('bidi-write-loop: failed') |
|
|
|
GRPC.logger.warn('bidi-write-loop: failed') |
|
|
|
GRPC.logger.warn(e) |
|
|
|
GRPC.logger.warn(e) |
|
|
|