Return 404 for WS handler when session doesnt exist

This commit is contained in:
Marcos Lilljedahl
2017-07-31 18:20:27 -03:00
parent fa3b56ecfe
commit 7a49c557e0
4 changed files with 20 additions and 8 deletions

View File

@@ -21,7 +21,7 @@ func Ping(rw http.ResponseWriter, req *http.Request) {
return
}
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Microsecond)
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
defer cancel()
if _, err := c.Info(ctx); err != nil && err == context.DeadlineExceeded {