From 83f96fbd41d55423bb35c2eb2ff2e42705870d5b Mon Sep 17 00:00:00 2001 From: Mickael Remond Date: Mon, 24 Jun 2019 12:16:19 +0200 Subject: [PATCH] Fix error code --- router.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/router.go b/router.go index d164cf8..b252db6 100644 --- a/router.go +++ b/router.go @@ -40,7 +40,6 @@ func (r *Router) route(s Sender, p Packet) { match.Handler.HandlePacket(s, p) return } - // If there is no match and we receive an iq set or get, we need to send a reply if iq, ok := p.(IQ); ok { if iq.Type == IQTypeGet || iq.Type == IQTypeSet { @@ -52,7 +51,7 @@ func (r *Router) route(s Sender, p Packet) { func iqNotImplemented(s Sender, iq IQ) { err := Err{ XMLName: xml.Name{Local: "error"}, - Code: 500, + Code: 501, Type: "cancel", Reason: "feature-not-implemented", }