mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
[FIXED] trace/debug/sys_log reload will affect existing clients
Fixed #1296, by altering client state on reload Detect a trace level change on reload and update all clients. To avoid data races, read client.trace while holding the lock, pass the value into functionis that trace while not holding the lock. Delete unused client.debug. Signed-off-by: Matthias Hanel <mh@synadia.com>
This commit is contained in:
@@ -301,7 +301,7 @@ func TestParsePubArg(t *testing.T) {
|
||||
subject: "foo", reply: "", size: 2222, szb: "2222"},
|
||||
} {
|
||||
t.Run(test.arg, func(t *testing.T) {
|
||||
if err := c.processPub(false, []byte(test.arg)); err != nil {
|
||||
if err := c.processPub([]byte(test.arg), false); err != nil {
|
||||
t.Fatalf("Unexpected parse error: %v\n", err)
|
||||
}
|
||||
if !bytes.Equal(c.pa.subject, []byte(test.subject)) {
|
||||
@@ -324,7 +324,7 @@ func TestParsePubBadSize(t *testing.T) {
|
||||
c := dummyClient()
|
||||
// Setup localized max payload
|
||||
c.mpay = 32768
|
||||
if err := c.processPub(false, []byte("foo 2222222222222222")); err == nil {
|
||||
if err := c.processPub([]byte("foo 2222222222222222"), false); err == nil {
|
||||
t.Fatalf("Expected parse error for size too large")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user