aboutsummaryrefslogtreecommitdiffhomepage
path: root/unix.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix.c')
-rw-r--r--unix.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/unix.c b/unix.c
index b0e6ee2..8f157b2 100644
--- a/unix.c
+++ b/unix.c
@@ -193,6 +193,7 @@ enet_socket_create (ENetSocketType type, const ENetAddress * address)
(struct sockaddr *) & sin,
sizeof (struct sockaddr_in)) == -1 ||
(type == ENET_SOCKET_TYPE_STREAM &&
+ address -> port != ENET_PORT_ANY &&
listen (newSocket, SOMAXCONN) == -1))
{
close (newSocket);