func ClearSession(config *Config, timeout time.Duration) error {
	newConfig := *config
	newConfig.CleanSession = true
	client := New()
	future, err := client.Connect(&newConfig)
	if err != nil {
		return err
	}
	err = future.Wait(timeout)
	if err != nil {
		return err
	}
	err = client.Disconnect()
	if err != nil {
		return err
	}
	return nil
}
ClearSession will connect to the specified broker and request a clean session.
package client
import (
	"time"
	"github.com/256dpi/gomqtt/packet"
)