Skip to content

Commit

Permalink
Fix err
Browse files Browse the repository at this point in the history
  • Loading branch information
0xaa4eb committed Oct 22, 2023
1 parent 71eb77b commit eacd1ce
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ulyp-agent-api/src/main/java/com/ulyp/agent/Api.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ public static void resetRecordingFile() {

public static void startRecording() {
ApiHolder.instance.setRecording(
RecordingEnabled.newBuilder().setValue(true).getDefaultInstanceForType(),
RecordingEnabled.newBuilder().setValue(true).build(),
new NoopStreamObserver<>()
);
}

public static void endRecording() {
ApiHolder.instance.setRecording(
RecordingEnabled.newBuilder().setValue(false).getDefaultInstanceForType(),
RecordingEnabled.newBuilder().setValue(false).build(),
new NoopStreamObserver<>()
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.ulyp.agent;

import com.ulyp.core.exception.UlypException;
import io.grpc.stub.StreamObserver;

public class NoopStreamObserver<V> implements StreamObserver<V> {
Expand All @@ -9,6 +10,7 @@ public void onNext(V value) {

@Override
public void onError(Throwable t) {
throw new UlypException(t);
}

@Override
Expand Down

0 comments on commit eacd1ce

Please sign in to comment.