aboutsummaryrefslogtreecommitdiffstats
path: root/erts/epmd/src/epmd_int.h
diff options
context:
space:
mode:
authorMichael Santos <[email protected]>2010-03-20 21:30:32 -0400
committerBjörn Gustavsson <[email protected]>2010-05-03 11:59:42 +0200
commitcfdd0e536c1f60ee649d1ffbb9ce2096e4e1a307 (patch)
tree47b490663dd4874e5d879df732f0e18b792b89b7 /erts/epmd/src/epmd_int.h
parent3a68c36ca7aed71d643ea29460e36fec7e56817d (diff)
downloadotp-cfdd0e536c1f60ee649d1ffbb9ce2096e4e1a307.tar.gz
otp-cfdd0e536c1f60ee649d1ffbb9ce2096e4e1a307.tar.bz2
otp-cfdd0e536c1f60ee649d1ffbb9ce2096e4e1a307.zip
Exit if an error occurs with the listening socket
Check errno if either select() or accept() returns an error and exit. This prevents epmd from looping and taking up 100% CPU.
Diffstat (limited to 'erts/epmd/src/epmd_int.h')
-rw-r--r--erts/epmd/src/epmd_int.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/erts/epmd/src/epmd_int.h b/erts/epmd/src/epmd_int.h
index 84578c72f8..5ead553f36 100644
--- a/erts/epmd/src/epmd_int.h
+++ b/erts/epmd/src/epmd_int.h
@@ -141,6 +141,10 @@
# define EADDRINUSE WSAEADDRINUSE
#endif
+#if defined(__WIN32__) && !defined(ECONNABORTED)
+# define ECONNABORTED WSAECONNABORTED
+#endif
+
#ifndef SOMAXCONN
# define SOMAXCONN 128
#endif