日志输出,空指针导致程序出错-测试获取帧
This commit is contained in:
parent
647def1279
commit
6a63d53117
|
|
@ -159,6 +159,11 @@ func Get(url string) int {
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetVideoStream(id int) {
|
func GetVideoStream(id int) {
|
||||||
|
defer func() {
|
||||||
|
if err := recover(); err != nil {
|
||||||
|
log.Printf("设备:%d 错误: %v\n", id, err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
is_get, ok := DeviceIsGettingFrame.Load(id)
|
is_get, ok := DeviceIsGettingFrame.Load(id)
|
||||||
if !ok {
|
if !ok {
|
||||||
log.Printf("device: %d not found", id)
|
log.Printf("device: %d not found", id)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue