Use transport factory function

This commit is contained in:
Wichert Akkerman
2019-10-11 07:19:55 +02:00
committed by Mickaël Rémond
parent 8db608ccc1
commit 06a76160c8
3 changed files with 11 additions and 3 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ func (c *Component) Connect() error {
}
func (c *Component) Resume(sm SMState) error {
var err error
c.transport = &XMPPTransport{Config: c.ComponentOptions.TransportConfiguration}
c.transport = NewTransport(c.ComponentOptions.TransportConfiguration)
if err = c.transport.Connect(); err != nil {
return err
}