mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 14:15:23 +02:00
[299422] [dstore] OutputHandler.readLines() not compatible with servers that return max 1024bytes available to be read
This commit is contained in:
parent
c190993440
commit
f70123a661
2 changed files with 12 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2003, 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2003, 2010 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -24,6 +24,7 @@
|
|||
* David McKnight (IBM) - [286671] Dstore shell service interprets < and > sequences
|
||||
* David McKnight (IBM) [290743] [dstore][shells] allow bash shells and custom shell invocation
|
||||
* David McKnight (IBM) [287305] [dstore] Need to set proper uid for commands when using SecuredThread and single server for multiple clients[
|
||||
* Peter Wang (IBM) [299422] [dstore] OutputHandler.readLines() not compatible with servers that return max 1024bytes available to be read
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.dstore.universal.miners.command;
|
||||
|
@ -681,7 +682,12 @@ public class CommandMinerThread extends MinerThread
|
|||
|
||||
writer.write(input);
|
||||
writer.newLine();
|
||||
writer.flush();
|
||||
try{
|
||||
writer.flush();
|
||||
}
|
||||
catch (Exception e){
|
||||
//TODO find actual cause of problem. This only fails on certain machines.
|
||||
}
|
||||
|
||||
if (!_isWindows && (input.startsWith("cd ") || input.equals("cd"))) //$NON-NLS-1$ //$NON-NLS-2$
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2009 IBM Corporation and others.
|
||||
* Copyright (c) 2006, 2010 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -18,6 +18,7 @@
|
|||
* David McKnight (IBM) - [282919] [dstore] server shutdown results in exception in shell io reading
|
||||
* David McKnight (IBM) - [286671] Dstore shell service interprets < and > sequences
|
||||
* David McKnight (IBM) [287305] [dstore] Need to set proper uid for commands when using SecuredThread and single server for multiple clients[
|
||||
* Peter Wang (IBM) [299422] [dstore] OutputHandler.readLines() not compatible with servers that return max 1024bytes available to be read
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.rse.internal.dstore.universal.miners.command;
|
||||
|
@ -166,7 +167,7 @@ public class OutputHandler extends Handler {
|
|||
|
||||
// if there's none, wait a bit and return true to continue
|
||||
if (available <= 0) {
|
||||
sleep(100);
|
||||
sleep(1500);
|
||||
available = _reader.available();
|
||||
}
|
||||
return available;
|
||||
|
@ -272,7 +273,7 @@ public class OutputHandler extends Handler {
|
|||
|
||||
int lastIndex = 0;
|
||||
|
||||
available = _reader.available();
|
||||
available = checkAvailable();
|
||||
if (available > 0)
|
||||
{
|
||||
while (!_endOfStream && lastIndex < MAX_OFFSET)
|
||||
|
|
Loading…
Add table
Reference in a new issue