client/New: fix assertion failure in Close()

Caused by a revert accident in commit
f2cdbeace6

Closes https://github.com/MusicPlayerDaemon/MPD/issues/631
This commit is contained in:
Max Kellermann 2019-08-22 14:43:53 +02:00
parent f2cdbeace6
commit c9081a206a
1 changed files with 2 additions and 1 deletions

View File

@ -82,7 +82,8 @@ Client::Close() noexcept
{
partition->instance.client_list->Remove(*this);
FullyBufferedSocket::Close();
if (FullyBufferedSocket::IsDefined())
FullyBufferedSocket::Close();
FormatInfo(client_domain, "[%u] closed", num);
delete this;