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

During resume(), incoming messages can arrive before resuming from persisted state is completed #19

Closed shoenig closed 10 years ago

shoenig commented 10 years ago

We should not start call read() (or basically don't start incoming) until after resume() has complete. This is a bit complicated, because resume makes use of the outgoing and incoming goroutines. Most likely, we'll need to have new indepenedent functions that do connection Read and Write that can be executed without the normal part of the client initialized.

robert17 commented 10 years ago

connack is now received in its own function, and incoming isn't started until after resume is completed.