From 83ae778d33f574b225a01a4b09f7f4e79dd08958 Mon Sep 17 00:00:00 2001 From: Mickael Remond Date: Sun, 9 Jun 2019 12:21:20 +0200 Subject: [PATCH] Return errors on SendRaw --- component.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/component.go b/component.go index 89a9afa..6d22389 100644 --- a/component.go +++ b/component.go @@ -171,8 +171,9 @@ func (c *Component) Send(packet Packet) error { // disconnect the component. It is up to the user of this method to // carefully craft the XML content to produce valid XMPP. func (c *Component) SendRaw(packet string) error { - fmt.Fprintf(c.conn, packet) - return nil + var err error + _, err = fmt.Fprintf(c.conn, packet) + return err } // handshake generates an authentication token based on StreamID and shared secret.