fix restart socket in emqttc