Fix error code
This commit is contained in:
parent
def9629a0b
commit
83f96fbd41
|
@ -40,7 +40,6 @@ func (r *Router) route(s Sender, p Packet) {
|
||||||
match.Handler.HandlePacket(s, p)
|
match.Handler.HandlePacket(s, p)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// If there is no match and we receive an iq set or get, we need to send a reply
|
// 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, ok := p.(IQ); ok {
|
||||||
if iq.Type == IQTypeGet || iq.Type == IQTypeSet {
|
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) {
|
func iqNotImplemented(s Sender, iq IQ) {
|
||||||
err := Err{
|
err := Err{
|
||||||
XMLName: xml.Name{Local: "error"},
|
XMLName: xml.Name{Local: "error"},
|
||||||
Code: 500,
|
Code: 501,
|
||||||
Type: "cancel",
|
Type: "cancel",
|
||||||
Reason: "feature-not-implemented",
|
Reason: "feature-not-implemented",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue