mirror of
https://github.com/hybridgroup/gocv
synced 2025-08-25 08:41:04 +08:00
Fix G108 (CWE-200) and G114 (CWE-676)
This commit is contained in:

committed by
Ron Evans

parent
213b6e75c6
commit
4bdbfe3719
@@ -20,8 +20,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
"time"
|
||||||
_ "net/http/pprof"
|
|
||||||
|
|
||||||
"github.com/hybridgroup/mjpeg"
|
"github.com/hybridgroup/mjpeg"
|
||||||
"gocv.io/x/gocv"
|
"gocv.io/x/gocv"
|
||||||
@@ -62,7 +61,14 @@ func main() {
|
|||||||
|
|
||||||
// start http server
|
// start http server
|
||||||
http.Handle("/", stream)
|
http.Handle("/", stream)
|
||||||
log.Fatal(http.ListenAndServe(host, nil))
|
|
||||||
|
server := &http.Server{
|
||||||
|
Addr: host,
|
||||||
|
ReadTimeout: 60 * time.Second,
|
||||||
|
WriteTimeout: 60 * time.Second,
|
||||||
|
}
|
||||||
|
|
||||||
|
log.Fatal(server.ListenAndServe())
|
||||||
}
|
}
|
||||||
|
|
||||||
func mjpegCapture() {
|
func mjpegCapture() {
|
||||||
|
Reference in New Issue
Block a user