#include <stddef.h>
#include <stdlib.h>
#include <sys/socket.h>
+#include <time.h>
#include <unistd.h>
#include <string>
#include "mutexlock.h"
#include "serverpool.h"
#include "state.pb.h"
+#include "stream.h"
#include "udpinput.h"
#include "util.h"
#include "version.h"
while (!should_stop()) {
if (sock == -1) {
int port_num = atoi(port.c_str());
- sock = create_server_socket(port_num, UDP_SOCKET);
+ sockaddr_in6 addr = CreateAnyAddress(port_num);
+ sock = create_server_socket(addr, UDP_SOCKET);
if (sock == -1) {
log(WARNING, "[%s] UDP socket creation failed. Waiting 0.2 seconds and trying again...",
url.c_str());