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 0579ee8
of PR #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 caolanm committed Oct 23, 2024
1 parent d91172f commit 049c205
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 @@ -218,10 +218,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 049c205

Please sign in to comment.