Skip to content

Commit acfeb8a

Browse files
committed
Fix #1520, #1223, bug for origin cluster 3+ servers. 3.0.74
1 parent 0200baa commit acfeb8a

6 files changed

+31
-3
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ For previous versions, please read:
145145

146146
## V3 changes
147147

148+
* v3.0, 2019-12-18, Fix [#1520][bug #1520] and [#1223][bug #1223], bug for origin cluster 3+ servers. 3.0.74
148149
* v3.0, 2019-12-18, For [#1042][bug #1042], add test for RAW AVC protocol.
149150
* v3.0, 2019-12-18, Detect whether flash enabled for srs-player. 3.0.73
150151
* v3.0, 2019-12-17, Fix HTTP CORS bug when sending response for OPTIONS. 3.0.72
@@ -1532,6 +1533,8 @@ Winlin
15321533
[bug #1042]: https://github.com/ossrs/srs/issues/1042
15331534
[bug #1445]: https://github.com/ossrs/srs/issues/1445
15341535
[bug #1506]: https://github.com/ossrs/srs/issues/1506
1536+
[bug #1520]: https://github.com/ossrs/srs/issues/1520
1537+
[bug #1223]: https://github.com/ossrs/srs/issues/1223
15351538
[bug #xxxxxxxxxxxxx]: https://github.com/ossrs/srs/issues/xxxxxxxxxxxxx
15361539

15371540
[exo #828]: https://github.com/google/ExoPlayer/pull/828

trunk/conf/origin.cluster.serverA.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ vhost __defaultVhost__ {
1515
cluster {
1616
mode local;
1717
origin_cluster on;
18-
coworkers 127.0.0.1:9091;
18+
coworkers 127.0.0.1:9091 127.0.0.1:9092;
1919
}
2020
}

trunk/conf/origin.cluster.serverB.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ vhost __defaultVhost__ {
1515
cluster {
1616
mode local;
1717
origin_cluster on;
18-
coworkers 127.0.0.1:9090;
18+
coworkers 127.0.0.1:9090 127.0.0.1:9092;
1919
}
2020
}
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# the config for srs origin-origin cluster
2+
# @see https://github.com/ossrs/srs/wiki/v3_EN_OriginCluster
3+
# @see full.conf for detail config.
4+
5+
listen 19352;
6+
max_connections 1000;
7+
daemon off;
8+
srs_log_tank console;
9+
pid ./objs/origin.cluster.serverC.pid;
10+
http_api {
11+
enabled on;
12+
listen 9092;
13+
}
14+
vhost __defaultVhost__ {
15+
cluster {
16+
mode local;
17+
origin_cluster on;
18+
coworkers 127.0.0.1:9090 127.0.0.1:9091;
19+
}
20+
}

trunk/src/app/srs_app_rtmp_conn.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,11 @@ srs_error_t SrsRtmpConn::playing(SrsSource* source)
613613
+ "vhost=" + req->vhost + "&ip=" + req->host + "&app=" + req->app + "&stream=" + req->stream
614614
+ "&coworker=" + coworkers.at(i);
615615
if ((err = SrsHttpHooks::discover_co_workers(url, host, port)) != srs_success) {
616+
// If failed to discovery stream in this coworker, we should request the next one util the last.
617+
// @see https://github.com/ossrs/srs/issues/1223
618+
if (i < (int)coworkers.size() - 1) {
619+
continue;
620+
}
616621
return srs_error_wrap(err, "discover coworkers, url=%s", url.c_str());
617622
}
618623
srs_trace("rtmp: redirect in cluster, from=%s:%d, target=%s:%d, url=%s",

trunk/src/core/srs_core.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
// The version config.
2828
#define VERSION_MAJOR 3
2929
#define VERSION_MINOR 0
30-
#define VERSION_REVISION 73
30+
#define VERSION_REVISION 74
3131

3232
// The macros generated by configure script.
3333
#include <srs_auto_headers.hpp>

0 commit comments

Comments
 (0)