Skip to content

Commit

Permalink
Fix regression in Socket::shutdown() when having _noShutdown set
Browse files Browse the repository at this point in the history
Regression injected with commit 0579ee81c709865ea420c2d70dcc443bdf69de1a
of PR CollaboraOnline/online#9916

Original behavior was to do nothing in Socket::shutdown(),
while the commit in question did setClosed() leading
to an eventual socket close within SocketPoll::poll().

The latter causes an error within system ::ppoll().

Signed-off-by: Sven Göthel <[email protected]>
Change-Id: I57d46e0428905137e05d34dad450fea1d6a0f127
  • Loading branch information
Sven Göthel authored and andreasma committed Oct 23, 2024
1 parent 6fe6503 commit 2ddc12b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/Socket.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ class Socket
/// TODO: Support separate read/write shutdown.
virtual void shutdown()
{
setClosed();
if (!_noShutdown)
{
LOG_TRC("Socket shutdown RDWR. " << *this);
setClosed();
if constexpr (!Util::isMobileApp())
::shutdown(_fd, SHUT_RDWR);
else
Expand Down

0 comments on commit 2ddc12b

Please sign in to comment.