mirror of
https://github.com/kerberos-io/onvif.git
synced 2026-08-23 15:08:33 +00:00
Merge pull request #4 from GreenLightning/master
Do not log "i/o timeout" errors
This commit is contained in:
2
go.mod
2
go.mod
@@ -1,6 +1,6 @@
|
||||
module github.com/use-go/onvif
|
||||
|
||||
go 1.14
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/beevik/etree v1.1.0
|
||||
|
||||
@@ -10,9 +10,11 @@ package wsdiscovery
|
||||
*******************************************************/
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"log"
|
||||
"net"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/gofrs/uuid"
|
||||
@@ -85,7 +87,9 @@ func sendUDPMulticast(msg string, interfaceName string) []string {
|
||||
b := make([]byte, bufSize)
|
||||
n, _, _, err := p.ReadFrom(b)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
if !errors.Is(err, os.ErrDeadlineExceeded) {
|
||||
fmt.Println(err)
|
||||
}
|
||||
break
|
||||
}
|
||||
result = append(result, string(b[0:n]))
|
||||
|
||||
Reference in New Issue
Block a user