mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-24 11:32:00 -08:00
Return errors on SendRaw
This commit is contained in:
parent
6fc12e9779
commit
83ae778d33
@ -171,8 +171,9 @@ func (c *Component) Send(packet Packet) error {
|
|||||||
// disconnect the component. It is up to the user of this method to
|
// disconnect the component. It is up to the user of this method to
|
||||||
// carefully craft the XML content to produce valid XMPP.
|
// carefully craft the XML content to produce valid XMPP.
|
||||||
func (c *Component) SendRaw(packet string) error {
|
func (c *Component) SendRaw(packet string) error {
|
||||||
fmt.Fprintf(c.conn, packet)
|
var err error
|
||||||
return nil
|
_, err = fmt.Fprintf(c.conn, packet)
|
||||||
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// handshake generates an authentication token based on StreamID and shared secret.
|
// handshake generates an authentication token based on StreamID and shared secret.
|
||||||
|
Loading…
Reference in New Issue
Block a user