Skip to content

Commit

Permalink
fix: added Call to OnEndInvoked on cookie failure (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew-Lees11 authored Feb 5, 2019
1 parent 511be68 commit f9dc117
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Sources/KituraSession/Session.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,7 @@ public class Session: RouterMiddleware {
if let session = request.session {
if newSession && !session.isEmpty {
guard self.cookieManager.addCookie(sessionId: session.id, domain: request.hostname, response: response) == true else {
response.status(.internalServerError)
next()
return
return previousOnEndInvoked()
}
}
if session.isDirty {
Expand Down

0 comments on commit f9dc117

Please sign in to comment.