Browse Source

Having TcpTransport hold a shared_pointer to itself while in its process function

eric.gressman 2 years ago
parent
commit
e68291f2e2
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/impl/tcptransport.cpp

+ 1 - 0
src/impl/tcptransport.cpp

@@ -384,6 +384,7 @@ void TcpTransport::triggerBufferedAmount(size_t amount) {
 }
 
 void TcpTransport::process(PollService::Event event) {
+	auto self = shared_from_this();
 	try {
 		switch (event) {
 		case PollService::Event::Error: {