Merge pull request #43 from m1k1o/master

Error in epr config
This commit is contained in:
Nurdism 2020-03-15 19:44:38 -04:00 committed by GitHub
commit 83ebf26cda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,13 +142,13 @@ func (s *WebRTC) Set() {
max := uint16(59100) max := uint16(59100)
epr := viper.GetString("epr") epr := viper.GetString("epr")
ports := strings.SplitN(epr, "-", -1) ports := strings.SplitN(epr, "-", -1)
if len(ports[0]) > 1 { if len(ports) > 1 {
start, err := strconv.ParseUint(ports[0], 16, 16) start, err := strconv.ParseUint(ports[0], 10, 16)
if err == nil { if err == nil {
min = uint16(start) min = uint16(start)
} }
end, err := strconv.ParseUint(ports[1], 16, 16) end, err := strconv.ParseUint(ports[1], 10, 16)
if err == nil { if err == nil {
max = uint16(end) max = uint16(end)
} }