forked from jshiffer/go-xmpp
Introduce Sender interface to abstract client sending in router handlers
This commit is contained in:
committed by
Mickaël Rémond
parent
b05e68c844
commit
9db33d5792
@@ -141,11 +141,11 @@ func (c *Component) recv() (err error) {
|
||||
// Handle stream errors
|
||||
switch p := val.(type) {
|
||||
case StreamError:
|
||||
c.router.Route(c.conn, val)
|
||||
c.router.Route(c, val)
|
||||
c.streamError(p.Error.Local, p.Text)
|
||||
return errors.New("stream error: " + p.Error.Local)
|
||||
}
|
||||
c.router.Route(c.conn, val)
|
||||
c.router.Route(c, val)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user