mirror of
https://github.com/gen2brain/cam2ip.git
synced 2026-01-09 08:08:33 +00:00
Update server
This commit is contained in:
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/abbot/go-http-auth"
|
||||
|
||||
@@ -63,7 +64,10 @@ func (s *Server) ListenAndServe() error {
|
||||
|
||||
http.Handle("/", newAuthHandler(handlers.NewIndex(), basic))
|
||||
|
||||
srv := &http.Server{}
|
||||
srv := &http.Server{
|
||||
ReadTimeout: 5 * time.Second,
|
||||
WriteTimeout: 5 * time.Second,
|
||||
}
|
||||
|
||||
listener, err := net.Listen("tcp", s.Bind)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user