Prevent panics due to EOF in gob.Decode #5
No reviewers
Labels
No Label
break
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No Assignees
5 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: go-chi/session#5
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "zeripath/session:no-more-EOF-panic"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
If a session file has been truncated due to server disk errors then the FileReader may return an io.EOF error on Read().
This then percolates up to the session manager which will panic.
This PR instead suggests that we simply swallow this error and start off again with empty session data.
Signed-off-by: Andrew Thornton art27@cantab.net
Maybe it caused by a disk or file system problem? Should we still continue ignore the error?