summaryrefslogtreecommitdiff
path: root/src/network.cpp
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2021-11-27 22:29:53 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2021-11-28 20:14:33 +0100
commit53f4c26c4682a951e084415a594fcb8d9494033f (patch)
treee9e7ed894303df434e3b8d6592fb805075fd9e73 /src/network.cpp
parent6810c0e213226a62db1179a7c55bd351eb71ffe9 (diff)
Network: make Server non-copyable
Avoids issues with shared_from_this and does not make much sense anyway.
Diffstat (limited to 'src/network.cpp')
-rw-r--r--src/network.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/network.cpp b/src/network.cpp
index 2db450c..1e95571 100644
--- a/src/network.cpp
+++ b/src/network.cpp
@@ -269,7 +269,8 @@ Server::Priv::~Priv()
shared_ptr<Server::Priv> Server::Priv::getptr()
{
- return shared_from_this();
+ // Creating temporary object, so just use null deleter
+ return shared_ptr<Priv>(this, [](Priv *){});
}
void Server::Priv::doListen()