diff --git a/server/auth.go b/server/auth.go index 8e05f721..5045858d 100644 --- a/server/auth.go +++ b/server/auth.go @@ -1078,7 +1078,7 @@ URLS: } hostLabels := strings.Split(strings.ToLower(url.Hostname()), ".") // Following https://tools.ietf.org/html/rfc6125#section-6.4.3, should not => will not, may => will not - // The wilcard * never matches multiple label and only matches the left most label. + // The wildcard * never matches multiple label and only matches the left most label. if len(hostLabels) != len(dnsAltNameLabels) { continue URLS } diff --git a/server/client.go b/server/client.go index 97a05106..079e9cff 100644 --- a/server/client.go +++ b/server/client.go @@ -387,7 +387,7 @@ type readCache struct { rsz int32 // Read buffer size srs int32 // Short reads, used for dynamic buffer resizing. - // These are for readcache flags to avoind locks. + // These are for readcache flags to avoid locks. flags readCacheFlag // Capture the time we started processing our readLoop. diff --git a/server/events.go b/server/events.go index cdad49c1..d38a7118 100644 --- a/server/events.go +++ b/server/events.go @@ -270,7 +270,7 @@ func newPubMsg(c *client, sub, rply string, si *ServerInfo, hdr map[string]strin } else { m = &pubMsg{} } - // When getting something from a pool it is criticical that all fields are + // When getting something from a pool it is critical that all fields are // initialized. Doing this way guarantees that if someone adds a field to // the structure, the compiler will fail the build if this line is not updated. (*m) = pubMsg{c, sub, rply, si, hdr, msg, oct, echo, last} diff --git a/server/gateway.go b/server/gateway.go index 207227e9..35b50a12 100644 --- a/server/gateway.go +++ b/server/gateway.go @@ -1320,7 +1320,7 @@ func (s *Server) processGatewayInfoFromRoute(info *Info, routeSrvID string, rout // Sends INFO protocols to the given route connection for each known Gateway. // These will be processed by the route and delegated to the gateway code to -// imvoke processImplicitGateway. +// invoke processImplicitGateway. func (s *Server) sendGatewayConfigsToRoute(route *client) { gw := s.gateway gw.RLock()