Skip to content

Commit

Permalink
Fix small issue for nil ServerOpts
Browse files Browse the repository at this point in the history
  • Loading branch information
9seconds committed Dec 16, 2020
1 parent 89b4e44 commit d614d68
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion opts.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,11 @@ func (s *ServerOpts) GetTLSSkipVerify() bool {
// GetLayers returns a set of server layers to use.
func (s *ServerOpts) GetLayers() []layers.Layer {
toReturn := []layers.Layer{layerStartHeaders{}}
toReturn = append(toReturn, s.Layers...)

if s != nil {
toReturn = append(toReturn, s.Layers...)
}

toReturn = append(toReturn, layerFinishHeaders{})

return toReturn
Expand Down

0 comments on commit d614d68

Please sign in to comment.