libreoffice-online/net
Michael Meeks eceb1db8ec bgsave: remove closed sockets from Kit's SocketPoll.
Hard closing without shutdown is necessary, but we continued to poll
and read on an fd that would be re-used to open eg. a ZIP file:

[ kitbgsv_007_001 ] TRC  #19: Incoming WebSocket data of 13522 bytes: 50 4B 03 04 14 00 00 08  00 00 29 9C 90 58 33 26  AC A8 2F 00 00 00 2F 00  00 00 08 00 00 00 6D 69  | PK........)..X3&../.../.......m"
...
[ kitbgsv_007_001 ] ERR  #19: An unfragmented message or the first fragment of a fragmented message must have the opcode different than 0| net/WebSocketHandler.hpp:452

which would then close the file unhelpfully.

Not removing the socketHandler when cleaning up means that
we trigger the ForKit's ServerWSHandler::onDisconnect which
SigUtil::setTerminationFlag() causing all 2nd kit processes
to expire on start.

We also want to ensure that we update the thread-id of the last
forkit process before we start removing sockets and checking
thread-ids.

We want to get rid of the parent process' sockets we inherited
but don't need very cleanly post fork.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I82966f4421fc96df552fd50cf81c8b0bc92b9bbb
2024-04-17 08:35:30 +01:00
..
Buffer.hpp
clientnb.cpp clientnb: missing include 2024-03-15 11:49:09 +10:30
DelaySocket.cpp
DelaySocket.hpp
FakeSocket.cpp cool#8328 - config header fixup. 2024-02-21 09:35:25 +00:00
FakeSocket.hpp sockets should use CLOEXEC ticket cool#8016 2024-01-29 21:01:39 +00:00
HttpHelper.cpp cool#8328 - config header fixup. 2024-02-21 09:35:25 +00:00
HttpHelper.hpp wsd: detect unencoded WOPISrc 2024-02-09 03:57:04 -05:00
HttpRequest.cpp reduce uses of MOBILEAPP on some files 2024-03-20 09:13:00 +01:00
HttpRequest.hpp killpoco: use http::Response in admin file serving 2024-03-19 20:51:02 -04:00
NetUtil.cpp sockets should use CLOEXEC ticket cool#8016 2024-01-29 21:01:39 +00:00
NetUtil.hpp
ServerSocket.hpp
Socket.cpp bgsave: remove closed sockets from Kit's SocketPoll. 2024-04-17 08:35:30 +01:00
Socket.hpp bgsave: remove closed sockets from Kit's SocketPoll. 2024-04-17 08:35:30 +01:00
Ssl.cpp
Ssl.hpp
SslSocket.hpp net: add socketpair wrapper. 2024-03-12 08:49:39 +00:00
WebSocketHandler.hpp Websocket: allow a hard shutdown after flushing data. 2024-03-29 13:04:09 +00:00