mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-19 00:18:42 +01:00
Don't reuse metadata in ServerInterceptorUtil
This commit is contained in:
committed by
ravi-signal
parent
eedc4e23fe
commit
77c4962db8
@@ -15,8 +15,6 @@ public class ServerInterceptorUtil {
|
||||
@SuppressWarnings("rawtypes")
|
||||
private static final ServerCall.Listener NO_OP_LISTENER = new ServerCall.Listener<>() {};
|
||||
|
||||
private static final Metadata EMPTY_TRAILERS = new Metadata();
|
||||
|
||||
private ServerInterceptorUtil() {
|
||||
}
|
||||
|
||||
@@ -32,7 +30,7 @@ public class ServerInterceptorUtil {
|
||||
* @param <RespT> the type of response object returned by the server call
|
||||
*/
|
||||
public static <ReqT, RespT> ServerCall.Listener<ReqT> closeWithStatus(final ServerCall<ReqT, RespT> call, final Status status) {
|
||||
call.close(status, EMPTY_TRAILERS);
|
||||
call.close(status, new Metadata());
|
||||
|
||||
//noinspection unchecked
|
||||
return NO_OP_LISTENER;
|
||||
|
||||
Reference in New Issue
Block a user