mirror of
https://github.com/morgan9e/UxPlay
synced 2026-04-14 00:04:13 +09:00
revert commit 5efcf01 of March 12, 2020
This breaks reconnection after "stop streaming" is sent by client. It was intended to aid reconnection if a network interruption left a socket blocked. Some other fix for that issue will be needed. This is connected to issue #58
This commit is contained in:
@@ -180,7 +180,6 @@ raop_rtp_mirror_thread(void *arg)
|
||||
bool conn_reset = false;
|
||||
uint64_t ntp_timestamp_nal = 0;
|
||||
uint64_t ntp_timestamp_raw = 0;
|
||||
bool conn_started = false;
|
||||
unsigned char nal_start_code[4] = { 0x00, 0x00, 0x00, 0x01 };
|
||||
|
||||
#ifdef DUMP_H264
|
||||
@@ -274,15 +273,10 @@ raop_rtp_mirror_thread(void *arg)
|
||||
}
|
||||
|
||||
if (payload == NULL && ret == 0) {
|
||||
if (conn_started) {
|
||||
logger_log(raop_rtp_mirror->logger, LOGGER_ERR, "raop_rtp_mirror tcp socket is closed, connection ended");
|
||||
break;
|
||||
} else {
|
||||
logger_log(raop_rtp_mirror->logger, LOGGER_ERR, "raop_rtp_mirror tcp socket is closed, got %d bytes of 128 byte header",readstart);
|
||||
FD_CLR(stream_fd, &rfds);
|
||||
stream_fd = -1;
|
||||
continue;
|
||||
}
|
||||
logger_log(raop_rtp_mirror->logger, LOGGER_ERR, "raop_rtp_mirror tcp socket is closed, got %d bytes of 128 byte header",readstart);
|
||||
FD_CLR(stream_fd, &rfds);
|
||||
stream_fd = -1;
|
||||
continue;
|
||||
} else if (payload == NULL && ret == -1) {
|
||||
if (errno == EAGAIN || errno == EWOULDBLOCK) continue; // Timeouts can happen even if the connection is fine
|
||||
logger_log(raop_rtp_mirror->logger, LOGGER_ERR, "raop_rtp_mirror error in header recv: %d %s", errno, strerror(errno));
|
||||
@@ -290,8 +284,6 @@ raop_rtp_mirror_thread(void *arg)
|
||||
break;
|
||||
}
|
||||
|
||||
conn_started = true;
|
||||
|
||||
/*packet[0:3] contains the payload size */
|
||||
int payload_size = byteutils_get_int(packet, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user