Browse Source

Merge pull request #846 from paullouisageneau/fix-tls-disconnected-state-openssl

Fix missing TLS state change on disconnection with OpenSSL
Paul-Louis Ageneau 2 years ago
parent
commit
b204f40bb6
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/impl/tlstransport.cpp

+ 1 - 0
src/impl/tlstransport.cpp

@@ -484,6 +484,7 @@ void TlsTransport::runRecvLoop() {
 
 	if (state() == State::Connected) {
 		PLOG_INFO << "TLS closed";
+		changeState(State::Disconnected);
 		recv(nullptr);
 	} else {
 		PLOG_ERROR << "TLS handshake failed";