aboutsummaryrefslogtreecommitdiffstats
path: root/src/Client.hxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Client.hxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Client.hxx b/src/Client.hxx
index f0bc6b0f7..ec7d2d741 100644
--- a/src/Client.hxx
+++ b/src/Client.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2013 The Music Player Daemon Project
+ * Copyright (C) 2003-2014 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -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.