Skip to content

Commit

Permalink
Add Singleton to JsPlugins provider. (#4892)
Browse files Browse the repository at this point in the history
This fixes a registration issue - otherwise, the provider for JsPluginRegistration will create a new JsPlugins.

Fixes a bug introduced by #4885
  • Loading branch information
devinrsmith authored Nov 29, 2023
1 parent 3d8f9e2 commit fb87423
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
import io.grpc.servlet.jakarta.ServletServerBuilder;

import javax.inject.Named;
import javax.inject.Singleton;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.util.Set;
Expand Down Expand Up @@ -71,6 +72,7 @@ static ServletAdapter provideGrpcServletAdapter(
JsPluginRegistration bindJsPlugins(JsPlugins plugins);

@Provides
@Singleton
static JsPlugins providesJsPluginRegistration() {
try {
return JsPlugins.create();
Expand Down

0 comments on commit fb87423

Please sign in to comment.