CodeIgniter Forums
Why session->destroy()? - Printable Version

+- CodeIgniter Forums (
+-- Forum: CodeIgniter 4 (
+--- Forum: CodeIgniter 4 Support (
+--- Thread: Why session->destroy()? (/thread-75088.html)

Why session->destroy()? - tgix - 12-18-2019

Currently working on a REST-based backend and as always the questions is about concurrency. Referring to and the section "A note about concurrency". Why on earth would I use session->destroy()?!? This will clear out the session and all data. 
Isn't session_write_close() as soon as you can the correct way to handle concurrency?

RE: Why session->destroy()? - dave friend - 12-19-2019

I believe you are correct. The docs should say session_write_close()