summaryrefslogtreecommitdiff
path: root/osdep
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@gmail.com>2015-09-02 15:51:28 -0700
committerAdam Ierymenko <adam.ierymenko@gmail.com>2015-09-02 15:51:28 -0700
commitdfb08ec753018b8f81cd81839b737ef6f75a9901 (patch)
tree6f6e3961ec314f091b9dc01d9120bb8e4b25d4dc /osdep
parent4626175d113da7201a6f1f0b79e23f3f92099ca5 (diff)
downloadinfinitytier-dfb08ec753018b8f81cd81839b737ef6f75a9901.tar.gz
infinitytier-dfb08ec753018b8f81cd81839b737ef6f75a9901.zip
More netcon stuff, and Phy build fix.
Diffstat (limited to 'osdep')
-rw-r--r--osdep/Phy.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/osdep/Phy.hpp b/osdep/Phy.hpp
index aad40cd1..979e6dfa 100644
--- a/osdep/Phy.hpp
+++ b/osdep/Phy.hpp
@@ -58,6 +58,7 @@
#include <sys/types.h>
#include <sys/select.h>
#include <sys/socket.h>
+#include <sys/un.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
@@ -919,6 +920,11 @@ public:
ZT_PHY_CLOSE_SOCKET(sws.sock);
+#ifdef __UNIX_LIKE__
+ if (sws.type == ZT_PHY_SOCKET_UNIX_LISTEN)
+ ::unlink(((struct sockaddr_un *)(&(sws.saddr)))->sun_path);
+#endif // __UNIX_LIKE__
+
if (callHandlers) {
switch(sws.type) {
case ZT_PHY_SOCKET_TCP_OUT_PENDING: