Skip to content

Commit 6e628d1

Browse files
author
zhourenjian@gmail.com
committed
Fixing bugs on reconnecting on same pipe
1 parent 62d8721 commit 6e628d1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ protected static void sendRequest(HttpRequest request, String method, String url
225225
*/
226226
public static void pipe(final SimplePipeRunnable runnable) {
227227
runnable.ajaxIn();
228+
runnable.lastLiveDetected = System.currentTimeMillis();
228229
if (getRequstMode() == MODE_LOCAL_JAVA_THREAD) {
229230
ThreadUtils.runTask(new Runnable() {
230231
public void run() {
@@ -249,6 +250,9 @@ public void run() {
249250
*/
250251
@J2SIgnore
251252
static void keepPipeLive(final SimplePipeRunnable pipe) {
253+
if (pipe.pipeKey == null) {
254+
return;
255+
}
252256
pipe.updateStatus(true);
253257
if (getRequstMode() != MODE_LOCAL_JAVA_THREAD && getPipeMode() == MODE_PIPE_QUERY) {
254258
return;

0 commit comments

Comments
 (0)