aboutsummaryrefslogtreecommitdiff
path: root/src/threadsocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/threadsocket.cpp')
-rw-r--r--src/threadsocket.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/threadsocket.cpp b/src/threadsocket.cpp
index 86b36eac0..323376b98 100644
--- a/src/threadsocket.cpp
+++ b/src/threadsocket.cpp
@@ -29,7 +29,9 @@
class ThreadSignalSocket final
: public EventHandler
{
- SocketThread* parent;
+private:
+ SocketThread* parent = nullptr;
+
public:
ThreadSignalSocket(SocketThread* p, int newfd) : parent(p)
{
@@ -67,10 +69,10 @@ public:
SocketThread::SocketThread()
{
- socket = nullptr;
int fd = eventfd(0, EFD_NONBLOCK);
if (fd < 0)
throw CoreException("Could not create pipe " + std::string(strerror(errno)));
+
socket = new ThreadSignalSocket(this, fd);
}
#else