Prevent `disconnected` socket callbacks to be called multiple times
Prevent `disconnected` socket callbacks to be called multiple times

Check if the `error` function has been called already. If that's the case
we should return early, otherwise the clean-up code and the disconnected
callbacks could be called multiple times.

Change-Id: I0aee65fc8233770bdcabac3a173718351efe21bb
Reviewed-on: http://gerrit.aldebaran.lan/55381
Reviewed-by: pdaouadi <fc1eb3334d3fdad315bae23aa166bc70bd434067@aldebaran-robotics.com>
Approved: tfontenay <c24d15a4b18b5a000d37b3d79586313e143f61c8@aldebaran-robotics.com>
Reviewed-by: tfontenay <c24d15a4b18b5a000d37b3d79586313e143f61c8@aldebaran-robotics.com>
Tested-by: tfontenay <c24d15a4b18b5a000d37b3d79586313e143f61c8@aldebaran-robotics.com>

aldebaran/libqi,aldebaran/libqi,aldebaran/libqi