mirror of
https://github.com/YGGverse/ggemini.git
synced 2026-03-31 17:15:31 +00:00
handle SocketConnection close errors, remove deprecated implementation
This commit is contained in:
parent
79f219ba76
commit
6ee60e9d9d
1 changed files with 3 additions and 15 deletions
|
|
@ -51,23 +51,11 @@ impl Connection {
|
||||||
// Actions
|
// Actions
|
||||||
|
|
||||||
/// Close owned [SocketConnection](https://docs.gtk.org/gio/class.SocketConnection.html)
|
/// Close owned [SocketConnection](https://docs.gtk.org/gio/class.SocketConnection.html)
|
||||||
/// and [TlsClientConnection](https://docs.gtk.org/gio/iface.TlsClientConnection.html) if active
|
|
||||||
pub fn close(&self) -> Result<(), Error> {
|
pub fn close(&self) -> Result<(), Error> {
|
||||||
/* Do not close `TlsClientConnection` as wanted for re-handshake
|
match self.socket_connection.close(self.cancellable.as_ref()) {
|
||||||
on user certificate change in runtime! @TODO
|
Ok(()) => Ok(()),
|
||||||
if let Some(ref tls_client_connection) = self.tls_client_connection {
|
Err(e) => Err(Error::SocketConnection(e)),
|
||||||
if !tls_client_connection.is_closed() {
|
|
||||||
if let Err(e) = tls_client_connection.close(self.cancellable.as_ref()) {
|
|
||||||
return Err(Error::TlsClientConnection(e));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} */
|
|
||||||
if !self.socket_connection.is_closed() {
|
|
||||||
if let Err(e) = self.socket_connection.close(self.cancellable.as_ref()) {
|
|
||||||
return Err(Error::SocketConnection(e));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Request force handshake for `Self`
|
/// Request force handshake for `Self`
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue