mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-14 18:20:42 -07:00
Incorporating comments.
c -> client defer in oneliner argument order Signed-off-by: Matthias Hanel <mh@synadia.com>
This commit is contained in:
@@ -2562,7 +2562,7 @@ func (c *client) deliverMsg(sub *subscription, subject, mh, msg []byte, gwrply b
|
||||
c.pcd[client] = needFlush
|
||||
}
|
||||
|
||||
if c.trace {
|
||||
if client.trace {
|
||||
client.traceOutOp(string(mh[:len(mh)-LEN_CR_LF]), nil)
|
||||
}
|
||||
|
||||
|
||||
@@ -1723,7 +1723,7 @@ func (c *client) processGatewayAccountSub(accName string) error {
|
||||
// the sublist if present.
|
||||
// <Invoked from outbound connection's readLoop>
|
||||
func (c *client) processGatewayRUnsub(arg []byte, trace bool) error {
|
||||
accName, subject, queue, err := c.parseUnsubProto(trace, arg)
|
||||
accName, subject, queue, err := c.parseUnsubProto(arg, trace)
|
||||
if err != nil {
|
||||
return fmt.Errorf("processGatewaySubjectUnsub %s", err.Error())
|
||||
}
|
||||
|
||||
@@ -895,8 +895,8 @@ func (s *Server) reloadClientTraceLevel() {
|
||||
update := func(c *client) {
|
||||
// client.trace is commonly read while holding the lock
|
||||
c.mu.Lock()
|
||||
defer c.mu.Unlock()
|
||||
c.setTraceLevel()
|
||||
c.mu.Unlock()
|
||||
}
|
||||
|
||||
// Iterate over every client and update
|
||||
|
||||
@@ -668,7 +668,7 @@ func (c *client) removeRemoteSubs() {
|
||||
}
|
||||
}
|
||||
|
||||
func (c *client) parseUnsubProto(trace bool, arg []byte) (string, []byte, []byte, error) {
|
||||
func (c *client) parseUnsubProto(arg []byte, trace bool) (string, []byte, []byte, error) {
|
||||
if trace {
|
||||
c.traceInOp("RS-", arg)
|
||||
}
|
||||
@@ -695,7 +695,7 @@ func (c *client) processRemoteUnsub(arg []byte, trace bool) (err error) {
|
||||
if srv == nil {
|
||||
return nil
|
||||
}
|
||||
accountName, subject, _, err := c.parseUnsubProto(trace, arg)
|
||||
accountName, subject, _, err := c.parseUnsubProto(arg, trace)
|
||||
if err != nil {
|
||||
return fmt.Errorf("processRemoteUnsub %s", err.Error())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user