[BUGFIX] no pointer in type case in component

This commit is contained in:
Martin/Geno 2019-05-31 13:46:57 +02:00
parent 95dded61a1
commit 757e339946
No known key found for this signature in database
GPG Key ID: 9D7D3C6BFF600C6A

View File

@ -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())