[Libreoffice-commits] online.git: net/Socket.hpp wsd/LOOLWSD.cpp
Ashod Nakashian
ashod.nakashian at collabora.co.uk
Wed Apr 5 04:41:42 UTC 2017
net/Socket.hpp | 5 ++++-
wsd/LOOLWSD.cpp | 4 ++--
2 files changed, 6 insertions(+), 3 deletions(-)
New commits:
commit cbd78484ad6efcea708b0deb3efb888894bb6f0f
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date: Tue Apr 4 21:04:48 2017 -0400
wsd: warn when waking dead poll
And insert sockets after starting the
thread so we poll the socket immediately.
Change-Id: Id336e1838f2f624ebfe59c4c2caf33eaa1a638c9
Reviewed-on: https://gerrit.libreoffice.org/36110
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
Tested-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/net/Socket.hpp b/net/Socket.hpp
index 9e06a040..f0a9975c 100644
--- a/net/Socket.hpp
+++ b/net/Socket.hpp
@@ -407,12 +407,15 @@ public:
} while (rc == -1 && errno == EINTR);
if (rc == -1 && errno != EAGAIN && errno != EWOULDBLOCK)
- LOG_WRN("wakeup socket #" << fd << " is closd at wakeup? error: " << errno);
+ LOG_SYS("wakeup socket #" << fd << " is closd at wakeup?");
}
/// Wakeup the main polling loop in another thread
void wakeup()
{
+ if (!isAlive())
+ LOG_WRN("Waking up dead poll thread [" << _name << "]");
+
wakeup(_wakeup[1]);
}
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 9e7bc8f8..e334f457 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2165,14 +2165,14 @@ public:
void startPrisoners(const int port)
{
- PrisonerPoll.insertNewSocket(findPrisonerServerPort(port));
PrisonerPoll.startThread();
+ PrisonerPoll.insertNewSocket(findPrisonerServerPort(port));
}
void start(const int port)
{
- _acceptPoll.insertNewSocket(findServerPort(port));
_acceptPoll.startThread();
+ _acceptPoll.insertNewSocket(findServerPort(port));
WebServerPoll.startThread();
Admin::instance().start();
}
More information about the Libreoffice-commits
mailing list