Skip to content

Commit 560829f

Browse files
AmirQadirAmir_Ali97
andauthored
Fix: middleware unary chain order (#464)
Co-authored-by: Amir_Ali97 <[email protected]>
1 parent b6d97fa commit 560829f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ import "github.com/grpc-ecosystem/go-grpc-middleware"
2929

3030
myServer := grpc.NewServer(
3131
grpc.StreamInterceptor(grpc_middleware.ChainStreamServer(
32-
grpc_recovery.StreamServerInterceptor(),
3332
grpc_ctxtags.StreamServerInterceptor(),
3433
grpc_opentracing.StreamServerInterceptor(),
3534
grpc_prometheus.StreamServerInterceptor,
3635
grpc_zap.StreamServerInterceptor(zapLogger),
3736
grpc_auth.StreamServerInterceptor(myAuthFunction),
37+
grpc_recovery.StreamServerInterceptor(),
3838
)),
3939
grpc.UnaryInterceptor(grpc_middleware.ChainUnaryServer(
40-
grpc_recovery.UnaryServerInterceptor(),
4140
grpc_ctxtags.UnaryServerInterceptor(),
4241
grpc_opentracing.UnaryServerInterceptor(),
4342
grpc_prometheus.UnaryServerInterceptor,
4443
grpc_zap.UnaryServerInterceptor(zapLogger),
4544
grpc_auth.UnaryServerInterceptor(myAuthFunction),
45+
grpc_recovery.UnaryServerInterceptor(),
4646
)),
4747
)
4848
```

0 commit comments

Comments
 (0)