mirror of
https://github.com/niusmallnan/steve.git
synced 2025-06-24 21:51:34 +00:00
Fix incorrect handler setup
This commit is contained in:
parent
b61ac7d555
commit
a66ef65fd9
@ -88,6 +88,8 @@ func (c *Server) Handler(ctx context.Context) (http.Handler, error) {
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c.Next = handler
|
||||||
|
|
||||||
for _, hook := range c.StartHooks {
|
for _, hook := range c.StartHooks {
|
||||||
if err := hook(ctx, c); err != nil {
|
if err := hook(ctx, c); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
@ -108,7 +110,7 @@ func (c *Server) Handler(ctx context.Context) (http.Handler, error) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return handler, nil
|
return c.Next, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Server) ListenAndServe(ctx context.Context, httpsPort, httpPort int, opts *server.ListenOpts) error {
|
func (c *Server) ListenAndServe(ctx context.Context, httpsPort, httpPort int, opts *server.ListenOpts) error {
|
||||||
|
Loading…
Reference in New Issue
Block a user