udp: handle default case for action switch
This commit is contained in:
parent
d4662312b6
commit
8dbcd7079a
1 changed files with 4 additions and 0 deletions
|
@ -47,6 +47,7 @@ var (
|
|||
errMalformedPacket = models.ProtocolError("malformed packet")
|
||||
errMalformedIP = models.ProtocolError("malformed IP address")
|
||||
errMalformedEvent = models.ProtocolError("malformed event ID")
|
||||
errUnknownAction = models.ProtocolError("unknown action ID")
|
||||
errBadConnectionID = errors.New("bad connection ID")
|
||||
)
|
||||
|
||||
|
@ -122,6 +123,9 @@ func (s *Server) handlePacket(packet []byte, addr *net.UDPAddr) (response []byte
|
|||
}
|
||||
|
||||
handleTorrentError(err, writer)
|
||||
|
||||
default:
|
||||
err = errUnknownAction
|
||||
}
|
||||
|
||||
return
|
||||
|
|
Loading…
Reference in a new issue