Explorar o código

Remove duplicated code. (#1013)

Peter Adams %!s(int64=5) %!d(string=hai) anos
pai
achega
494ad4d82d
Modificáronse 1 ficheiros con 1 adicións e 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)