Skip to content

Commit 920297a

Browse files
progvalspb
authored andcommitted
Simplify session removal
1 parent 56b82cc commit 920297a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sable_services/src/server/command/sasl_commands.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ impl<DB: DatabaseConnection> ServicesServer<DB> {
3030
let session = session_entry.get();
3131

3232
let Some(mechanism) = self.sasl_mechanisms.get(&session.mechanism) else {
33-
self.sasl_sessions.remove(&session_id);
33+
session_entry.remove();
3434
return Ok(Authenticate(Fail).into());
3535
};
3636

37-
match mechanism.step(self, &session, data) {
37+
match mechanism.step(self, session, data) {
3838
Ok(response) => Ok(Authenticate(response).into()),
3939
Err(e) => {
4040
tracing::debug!(?session_id, "SASL {} step failed: {e}", mechanism.name());

0 commit comments

Comments
 (0)