Browse Source

sets req r&w timeouts to 10s

master
Christian Müller 8 years ago
parent
commit
cb8891fd5b
  1. 1
      .gitignore
  2. 8
      server.go

1
.gitignore vendored

@ -4,3 +4,4 @@ database.sqlite-journal @@ -4,3 +4,4 @@ database.sqlite-journal
.DS_Store
vendor
database.sqlite
notehub

8
server.go

@ -9,6 +9,7 @@ import ( @@ -9,6 +9,7 @@ import (
"net/http"
"os"
"sync"
"time"
"database/sql"
@ -162,7 +163,12 @@ func main() { @@ -162,7 +163,12 @@ func main() {
return c.NoContent(http.StatusNoContent)
})
e.Logger.Fatal(e.Start(":3000"))
s := &http.Server{
Addr: ":3000",
ReadTimeout: 10 * time.Second,
WriteTimeout: 10 * time.Second,
}
e.Logger.Fatal(e.StartServer(s))
}
func fraudelent(n *Note) bool {

Loading…
Cancel
Save