1
0
Fork 0
mirror of https://github.com/alice-lg/birdwatcher.git synced 2025-03-09 00:00:05 +01:00

fxed version check

This commit is contained in:
Daniel Czerwonk 2018-01-18 18:34:08 +01:00
parent b592b735fd
commit 37d5eeaa13

View file

@ -4,6 +4,7 @@ import (
"bytes"
"io"
"reflect"
"strconv"
"strings"
"sync"
"time"
@ -326,7 +327,8 @@ func routeQueryForChannel(cmd string) string {
return cmd
}
if len(version) == 0 || int(version[0]) < 2 {
v, err := strconv.Atoi(string(version[0]))
if err != nil || v <= 2 {
return cmd
}