This commit is contained in:
Mickael Remond 2019-06-08 18:07:52 +02:00 committed by Mickaël Rémond
parent 36900cee20
commit 54dfa60f12

View file

@ -69,7 +69,6 @@ func (c *Component) Connect(connStr string) error {
default: default:
return errors.New("unexpected packet, got " + v.Name()) return errors.New("unexpected packet, got " + v.Name())
} }
panic("unreachable")
} }
// ReadPacket reads next incoming XMPP packet // ReadPacket reads next incoming XMPP packet
@ -96,7 +95,7 @@ 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) // TODO handle errors fmt.Fprintf(c.conn, packet)
return nil return nil
} }