From 95c551d0116f82f3125036abd629d2c6ffb2d927 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 27 Sep 2018 12:55:41 +0100 Subject: [PATCH] Fix showing active queues in yggdrasilctl --- yggdrasilctl.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yggdrasilctl.go b/yggdrasilctl.go index 912f6181..d04f7cd3 100644 --- a/yggdrasilctl.go +++ b/yggdrasilctl.go @@ -203,9 +203,9 @@ func main() { return } else { fmt.Println("Active queues:") - for k, v := range queues { - fmt.Printf("[%d] - Queue '%v', size: %d, packets: %d\n", k+1, - v.(map[string]interface{})["queue_id"].([]byte), + for _, v := range queues { + fmt.Printf("- Stream ID: %v, size: %d, packets: %d\n", + []byte(v.(map[string]interface{})["queue_id"].(string)), uint(v.(map[string]interface{})["queue_size"].(float64)), uint(v.(map[string]interface{})["queue_packets"].(float64))) }