Currently, Frame.toString, Client.connect, Client.send, Client.subscribe, Client.ack and Client.nack mutate the headers argument they are invoked with. This causes very subtle bugs in client code as these objects are modified without the caller's knowledge.
Instead, a copy of the headers should be made for the purpose of modification, leaving the original in tact.
Currently,
Frame.toString
,Client.connect
,Client.send
,Client.subscribe
,Client.ack
andClient.nack
mutate theheaders
argument they are invoked with. This causes very subtle bugs in client code as these objects are modified without the caller's knowledge.Instead, a copy of the headers should be made for the purpose of modification, leaving the original in tact.