diff options
Diffstat (limited to '')
-rw-r--r-- | src/Client.hxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Client.hxx b/src/Client.hxx index f0bc6b0f7..202cff4da 100644 --- a/src/Client.hxx +++ b/src/Client.hxx @@ -82,6 +82,11 @@ public: Client(EventLoop &loop, Partition &partition, int fd, int uid, int num); + ~Client() { + if (FullyBufferedSocket::IsDefined()) + FullyBufferedSocket::Close(); + } + bool IsConnected() const { return FullyBufferedSocket::IsDefined(); } @@ -165,7 +170,7 @@ void client_manager_init(void); void client_new(EventLoop &loop, Partition &partition, - int fd, const struct sockaddr *sa, size_t sa_length, int uid); + int fd, const sockaddr *sa, size_t sa_length, int uid); /** * Write a C string to the client. |