Ver código fonte

Remove duplicated code. (#1013)

Peter Adams 5 anos atrás
pai
commit
494ad4d82d
1 arquivos alterados com 1 adições e 1 exclusões
  1. 1 1
      Sources/GRPC/GRPCServerRequestRoutingHandler.swift

+ 1 - 1
Sources/GRPC/GRPCServerRequestRoutingHandler.swift

@@ -125,7 +125,7 @@ extension GRPCServerRequestRoutingHandler: ChannelInboundHandler, RemovableChann
 
   public func channelRead(context: ChannelHandlerContext, data: NIOAny) {
     let requestPart = self.unwrapInboundIn(data)
-    switch self.unwrapInboundIn(data) {
+    switch requestPart {
     case let .head(requestHead):
       precondition(self.state == .notConfigured)