shoenig / go-mqtt

A development fork of the Eclipse Paho Go MQTT client
http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.golang.git/
Eclipse Public License 1.0
13 stars 6 forks source link

Modifying an opts object should not modify any client objects that were created using it #7

Closed shoenig closed 10 years ago

shoenig commented 10 years ago

Right now client just uses a shallow-copy of the opts used to create it. If a user calls a Set method on the opts reference, they can probably break any client that was used to create it. The easy fix is to create a deep copy of opts during creation of the client object.

shoenig commented 10 years ago

fixed by 99a645c