add connection cancel request

This commit is contained in:
yggverse 2024-11-30 18:00:38 +02:00
parent 559e03f904
commit c12c57cc99

View file

@ -68,7 +68,12 @@ impl Session {
} }
} }
// Close connection if active yet // Cancel previous session operations
if let Err(e) = connection.cancel() {
return Err(Error::Connection(e));
}
// Close previous session connection
if let Err(e) = connection.close() { if let Err(e) = connection.close() {
return Err(Error::Connection(e)); return Err(Error::Connection(e));
} }