Skip to content

Commit b2c3e43

Browse files
author
zhourenjian@gmail.com
committed
Fixing bug that SimplePipe still try to connect pipe on pipeFailed
1 parent e8a6a89 commit b2c3e43

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

sources/net.sf.j2s.ajax/ajaxpipe/net/sf/j2s/ajax/SimplePipeRequest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,9 @@ public void onLoaded() {
448448
return;
449449
}
450450
runnable.ajaxOut();
451-
ajaxPipe(runnable);
451+
if (runnable.isPipeLive()) { // false if #pipeFailed is called in #ajaxOut
452+
ajaxPipe(runnable);
453+
}
452454
}
453455
});
454456
request.send(serialize);
@@ -1007,7 +1009,6 @@ public void onLoaded() { // on case that no destroy event is sent to client
10071009
* being parsed.
10081010
*/
10091011
public static String parseReceived(final String string) {
1010-
//System.out.println(string);
10111012
if (string == null) {
10121013
return null;
10131014
}

sources/net.sf.j2s.ajax/ajaxpipe/net/sf/j2s/ajax/SimplePipeRunnable.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ public void ajaxFail() {
202202
@Override
203203
public void ajaxOut() {
204204
if (pipeAlive) {
205+
updateStatus(true);
205206
pipeCreated();
206207
} else {
207208
pipeFailed();

0 commit comments

Comments
 (0)