summaryrefslogtreecommitdiff
path: root/src/event
diff options
context:
space:
mode:
authorAnthony DeRossi <ajderossi@gmail.com>2015-09-29 10:39:06 -0700
committerMax Kellermann <max@duempel.org>2015-09-30 21:50:34 +0200
commitde332a16d17a3e23438ba4dd05f27ad6bdd4a04d (patch)
tree3d65c56f47bca09e6ade87d17b81a3cb6bc84e62 /src/event
parent84ab3ee3af9612249a2aa97c955ce19a14074d4a (diff)
event/ServerSocket: fix AF_UNIX address in use error
bind fails with an "address already in use" error if the socket path already exists. This was broken by cbb595ba.
Diffstat (limited to 'src/event')
-rw-r--r--src/event/ServerSocket.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/event/ServerSocket.cxx b/src/event/ServerSocket.cxx
index 7e279dada..f82c533c3 100644
--- a/src/event/ServerSocket.cxx
+++ b/src/event/ServerSocket.cxx
@@ -431,6 +431,8 @@ ServerSocket::AddPath(AllocatedPath &&path, Error &error)
#ifdef HAVE_UN
(void)error;
+ RemoveFile(path);
+
AllocatedSocketAddress address;
address.SetLocal(path.c_str());