mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-21 18:12:00 -08:00
Merge pull request #22 from genofire/fix-component
[BUGFIX] no pointer in type case in component
This commit is contained in:
commit
0f6ff41792
@ -62,9 +62,9 @@ func (c *Component) Connect(connStr string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch v := val.(type) {
|
switch v := val.(type) {
|
||||||
case *StreamError:
|
case StreamError:
|
||||||
return errors.New("handshake failed " + v.Error.Local)
|
return errors.New("handshake failed " + v.Error.Local)
|
||||||
case *Handshake:
|
case Handshake:
|
||||||
return nil
|
return nil
|
||||||
default:
|
default:
|
||||||
return errors.New("unexpected packet, got " + v.Name())
|
return errors.New("unexpected packet, got " + v.Name())
|
||||||
|
Loading…
Reference in New Issue
Block a user