Better way to retrieve header support

Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
Derek Collison
2020-05-07 21:20:17 -07:00
parent 55c77d1e4e
commit d8b475c4b0

View File

@@ -2288,10 +2288,7 @@ func (s *Server) supportsHeaders() bool {
if s == nil {
return false
}
s.mu.Lock()
ans := s.info.Headers
s.mu.Unlock()
return ans
return !(s.getOpts().NoHeaderSupport)
}
// ID returns the server's ID