Kaynağa Gözat

Always include socket rebinding code

rl1987 5 yıl önce
ebeveyn
işleme
d8157097b4
1 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 3 2
      src/core/mainloop/connection.c

+ 3 - 2
src/core/mainloop/connection.c

@@ -146,10 +146,11 @@
  * EADDRINUSE.
  * 2) If so, it will close the appropriate old listener connection and
  * 3) Attempts bind()'ing the new listener socket again.
+ *
+ * Just to be safe, we are enabling listener rebind code on all platforms,
+ * to account for unexpected cases where it may be needed.
  */
-#if defined(__linux__) || defined(_WIN32)
 #define ENABLE_LISTENER_REBIND
-#endif
 
 static connection_t *connection_listener_new(
                                const struct sockaddr *listensockaddr,