mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-12-04 14:46:30 -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)
|
||||
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);
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user