diff --git a/lib/server.go b/lib/server.go index a9a6f08..8858897 100644 --- a/lib/server.go +++ b/lib/server.go @@ -1033,7 +1033,7 @@ func (vap *VAP) GetFlag() uint8 { func (c *Client) SendSDs(sessionId uint16, serialNumber uint32, data []SendableData) { sort.Slice(data, func(i, j int) bool { - if data[i].Type() == "VRP" && data[i].Type() != "VRP" { + if data[i].Type() == "VRP" && data[j].Type() != "VRP" { return false // Always send VRPs first } if data[i].Type() == "VRP" && data[j].Type() == "VRP" {