Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
Signed-off-by: Vishal Rana <[email protected]>
  • Loading branch information
vishr committed Mar 8, 2016
1 parent 6ed0b57 commit 79f7be2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion engine/fasthttp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ type (
Server struct {
config *engine.Config
handler engine.Handler
pool *Pool
logger *log.Logger
pool *Pool
}

Pool struct {
Expand Down
9 changes: 5 additions & 4 deletions engine/standard/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ type (
server *http.Server
config *engine.Config
handler engine.Handler
pool *Pool
logger *log.Logger
pool *Pool
}

Pool struct {
Expand All @@ -42,7 +42,10 @@ func NewWithTLS(addr, certfile, keyfile string) *Server {

func NewWithConfig(c *engine.Config) (s *Server) {
s = &Server{
server: new(http.Server),
server: &http.Server{
Addr: c.Address,
Handler: s,
},
config: c,
pool: &Pool{
request: sync.Pool{
Expand Down Expand Up @@ -83,8 +86,6 @@ func (s *Server) SetLogger(l *log.Logger) {
}

func (s *Server) Start() {
s.server.Addr = s.config.Address
s.server.Handler = s
certfile := s.config.TLSCertfile
keyfile := s.config.TLSKeyfile
if certfile != "" && keyfile != "" {
Expand Down

0 comments on commit 79f7be2

Please sign in to comment.