khonsulabs / bonsaidb

A developer-friendly document database that grows with you, written in Rust
https://bonsaidb.io/
Apache License 2.0
998 stars 37 forks source link

Session deauth #273

Closed ecton closed 1 year ago

ecton commented 1 year ago

Closes #264.

This PR addresses the ability for a Client to recognize that it has lost its authentication. This also fixes a lot of server shutdown and client reconnecting issues that were discovered in the process. There is one test that specifically targets this feature, which puts the server shutdown and client reconnection logic under code coverage finally.

During the implementation of this, I realized that each client was behaving a little differently with error propagation. All clients should now have identical error reporting behavior when a client disconnects.