mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-02-02 15:07:36 -05:00
Fix: Correctly detect error condition
This commit is contained in:
parent
4279a6caea
commit
8848d74e58
@ -358,9 +358,10 @@ int listensocket_refsock(listensocket_t *self)
|
|||||||
if (self->sock == SOCK_ERROR)
|
if (self->sock == SOCK_ERROR)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (sock_listen(self->sock, ICECAST_LISTEN_QUEUE) == SOCK_ERROR) {
|
if (sock_listen(self->sock, ICECAST_LISTEN_QUEUE) == 0) {
|
||||||
sock_close(self->sock);
|
sock_close(self->sock);
|
||||||
self->sock = SOCK_ERROR;
|
self->sock = SOCK_ERROR;
|
||||||
|
ICECAST_LOG_ERROR("Can not listen on socket: %s port %i", self->listener->bind_address ? self->listener->bind_address : "<ANY>", self->listener->port);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user