Skip to content

Commit

Permalink
Do not store the HTTPDummyServerDelegate object
Browse files Browse the repository at this point in the history
Kitura-Net keeps the HTTP server running even if a delegate isn't provided. We use a HTTPDummyServerDelegate for this purpose. Before this code change, we stored the dummy delegate in the delegate property of HTTPServer. This may be confusing to a user who will rightly think that delegate is nil if it isn't explicitly set.
  • Loading branch information
Pushkar Kulkarni committed Sep 24, 2018
1 parent c815224 commit 0d91164
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions Sources/KituraNet/HTTP/HTTPServer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@ public class HTTPServer : Server {
upgraders.append(upgrader)
}

if self.delegate == nil {
self.delegate = HTTPDummyServerDelegate()
}

let bootstrap = ServerBootstrap(group: eventLoopGroup)
.serverChannelOption(ChannelOptions.backlog, value: BacklogOption.OptionType(self.maxPendingConnections))
.serverChannelOption(ChannelOptions.socket(SocketOptionLevel(SOL_SOCKET), SO_REUSEADDR), value: 1)
Expand Down

0 comments on commit 0d91164

Please sign in to comment.