Commit 0cf99802 authored by 彭勇升 pengys's avatar 彭勇升 pengys Committed by 吴晟
Browse files

If transform throw exception, the stream observer won't call the onCompleted...

If transform throw exception, the stream observer won't call the onCompleted method, then the stream observer will wait it finish until the timeout. (#3163)
parent 8605f4cc
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -113,13 +113,14 @@ public class TraceSegmentServiceClient implements BootService, IConsumer<TraceSe
                    UpstreamSegment upstreamSegment = segment.transform();
                    upstreamSegmentStreamObserver.onNext(upstreamSegment);
                }
            } catch (Throwable t) {
                logger.error(t, "Transform and send UpstreamSegment to collector fail.");
            }

            upstreamSegmentStreamObserver.onCompleted();

            status.wait4Finish();
            segmentUplinkedCounter += data.size();
            } catch (Throwable t) {
                logger.error(t, "Transform and send UpstreamSegment to collector fail.");
            }
        } else {
            segmentAbandonedCounter += data.size();
        }