From a182fa8bde67023171e4defe5b9fad9fd4ff4609 Mon Sep 17 00:00:00 2001 From: Jason Date: Fri, 16 Aug 2019 14:24:34 +0800 Subject: [PATCH] Update server.go --- component/session/server.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/component/session/server.go b/component/session/server.go index ee2181f..a2aed6e 100644 --- a/component/session/server.go +++ b/component/session/server.go @@ -23,7 +23,7 @@ var ( ) type Server struct { - server *http.Server + *http.Server activeSessionMap sync.Map completedSessionQueue *queue.Queue } @@ -118,16 +118,16 @@ func (s *Server) Start() error { http.Redirect(w, r, ServePath, 301) }) mux.HandleFunc(ServePath, s.handler) - s.server = &http.Server{Addr: ServeAddr, Handler: mux} + s.Server = &http.Server{Addr: ServeAddr, Handler: mux} go func() { - s.server.Serve(c) + s.Serve(c) }() return nil } func (s *Server) Stop() error { - return s.server.Close() + return s.Close() } func (s *Server) AddSession(key interface{}, session *Session) {