Explorar el Código

Remove duplicated code. (#1013)

Peter Adams hace 5 años
padre
commit
494ad4d82d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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)