Sfoglia il codice sorgente

Merge pull request #821 from web2098/tcptransport_crash_fix

Fix crash in TcpTransport
Paul-Louis Ageneau 2 anni fa
parent
commit
18af779bcb
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. 4 0
      src/impl/tcptransport.cpp

+ 4 - 0
src/impl/tcptransport.cpp

@@ -384,6 +384,10 @@ void TcpTransport::triggerBufferedAmount(size_t amount) {
 }
 
 void TcpTransport::process(PollService::Event event) {
+	auto self = weak_from_this().lock();
+	if (!self)
+		return;
+
 	try {
 		switch (event) {
 		case PollService::Event::Error: {