Skip to content

Commit

Permalink
Remove commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Nov 3, 2023
1 parent 74ec5ba commit c9e3b79
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions Sources/HummingbirdCore/Server/HTTPServerHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -164,28 +164,6 @@ final class HBHTTPServerHandler: ChannelDuplexHandler, RemovableChannelHandler {
}
}
}
/* self.responder.respond(to: request, context: context) { result in
// should we keep the channel open after responding.
var response: HBHTTPResponse
switch result {
case .failure(let error):
response = self.getErrorResponse(context: context, error: error, version: httpVersion)

case .success(let successfulResponse):
response = successfulResponse
}
if httpVersion.major == 1 {
response.head.headers.replaceOrAdd(name: "connection", value: keepAlive ? "keep-alive" : "close")
}
// if we are already running inside the context eventloop don't use `EventLoop.execute`
if context.eventLoop.inEventLoop {
self.writeResponse(context: context, response: response, streamer: streamer, keepAlive: keepAlive)
} else {
context.eventLoop.execute {
self.writeResponse(context: context, response: response, streamer: streamer, keepAlive: keepAlive)
}
}
} */
}

func writeResponse(context: ChannelHandlerContext, response: HBHTTPResponse, streamer: HBByteBufferStreamer?, keepAlive: Bool) {
Expand Down

0 comments on commit c9e3b79

Please sign in to comment.