|
@@ -1054,10 +1054,12 @@ int main(int argc, char **argv) {
|
1054
|
1054
|
ntimeouts++;
|
1055
|
1055
|
} else {
|
1056
|
1056
|
if (ntimeouts && readen > 0) {
|
|
1057
|
+ time_t now = time(NULL);
|
|
1058
|
+ ts_LOGf("+++ | Input OK after %ld sec timeout.\n", (now - timeout_start) + 2);
|
1057
|
1059
|
notify(&ts, "INPUT_OK", "Data is available on input %s://%s:%s/ after %ld seconds timeout.",
|
1058
|
1060
|
ts.rtp_input ? "rtp" : "udp",
|
1059
|
1061
|
ts.input.hostname, ts.input.service,
|
1060
|
|
- (time(NULL) - timeout_start) + 2); // Timeout is detected when ~2 seconds there is no incoming data
|
|
1062
|
+ (now - timeout_start) + 2); // Timeout is detected when ~2 seconds there is no incoming data
|
1061
|
1063
|
ntimeouts = 0;
|
1062
|
1064
|
}
|
1063
|
1065
|
}
|