Skip to content

Commit a6ca1cf

Browse files
authored
Merge pull request #8 from red5pro/develop
Develop
2 parents 17ee2c4 + fa9edd5 commit a6ca1cf

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

pom.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.infrared5.rtmpbee</groupId>
55
<artifactId>rtmpbee</artifactId>
6-
<version>3.0.0-RELEASE</version>
6+
<version>3.1.0-RELEASE</version>
77
<packaging>jar</packaging>
88
<name>rtmpbee</name>
99
<url>http://infrared5.com</url>

src/main/java/com/infrared5/rtmpbee/Red5Bee.java

+10-2
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ public void OnBulletComplete() {
166166

167167
@Override
168168
public void OnBulletFireFail() {
169-
System.out.println("Failure for bullet to fire. Possible missing endpoint. Accessing a new endpoint from stream manager.");
170169
// If is an streammanager-based call, we may need to re-access on a test where the server went down.
171170
if (this.streamManagerURL != null) {
171+
System.out.println("Failure for bullet to fire. Possible missing endpoint. Accessing a new endpoint from stream manager.");
172172
try {
173173
modifyEndpointProperties(this.streamManagerURL);
174174
// build a bullet
@@ -182,6 +182,13 @@ public void OnBulletFireFail() {
182182
e.printStackTrace();
183183
}
184184
}
185+
else {
186+
int remaining = bulletsRemaining.decrementAndGet();
187+
if (remaining <= 0) {
188+
System.out.println("All bullets expended. Bye Bye.");
189+
System.exit(1);
190+
}
191+
}
185192
}
186193

187194
/**
@@ -269,7 +276,8 @@ else if (args.length >= 3 && args.length <= 4) {
269276
else if (args.length < 5) {
270277
System.out.printf("Incorrect number of args, please pass in the following: \n " + "\narg[0] = IP Address" + "\narg[1] = port" + "\narg[2] = app" + "\narg[3] = streamName" + "\narg[4] = numBullets");
271278
return;
272-
} else {
279+
}
280+
else {
273281
System.out.println("Determined its an original attack...");
274282
url = args[0];
275283
port = Integer.parseInt(args[1]);

0 commit comments

Comments
 (0)