Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-04-06 16:37:57 +0300
committerAlexey 'Cluster' Avdyukhin <clusterrr@clusterrr.com>2017-04-06 16:37:57 +0300
commit46fde67dc7a77bc57dd0503678a54aa22298a620 (patch)
treebe128baa0d5b9f6a1682a79eb4985f4a6bd90bdf /Clovershell
parent9c14d814fce204192b5d85b551aa169d4173959e (diff)
Rechecking free memory before uploading
Diffstat (limited to 'Clovershell')
-rw-r--r--Clovershell/ClovershellConnection.cs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Clovershell/ClovershellConnection.cs b/Clovershell/ClovershellConnection.cs
index a4f6ac3d..c96176ad 100644
--- a/Clovershell/ClovershellConnection.cs
+++ b/Clovershell/ClovershellConnection.cs
@@ -236,13 +236,14 @@ namespace com.clusterrr.clovershell
epReader = device.OpenEndpointReader((ReadEndpointID)inEndp, 65536);
epWriter = device.OpenEndpointWriter((WriteEndpointID)outEndp);
Debug.WriteLine("clovershell connected");
- // Kill all other serrions and drop all output
+ // Kill all other sessions and drop all output
killAll();
var body = new byte[65536];
int len;
while (epReader.Read(body, 50, out len) == ErrorCode.Ok) ;
epReader.ReadBufferSize = 65536;
epReader.DataReceived += epReader_DataReceived;
+ epReader.ReadThreadPriority = ThreadPriority.AboveNormal;
epReader.DataReceivedEnabled = true;
lastAliveTime = DateTime.Now;
online = true;
@@ -447,7 +448,7 @@ namespace com.clusterrr.clovershell
{
Thread.Sleep(50);
t++;
- if (t >= 200)
+ if (t >= 50)
throw new ClovershellException("shell request timeout");
}
}
@@ -629,7 +630,7 @@ namespace com.clusterrr.clovershell
{
Thread.Sleep(50);
t++;
- if (t >= 200)
+ if (t >= 50)
throw new ClovershellException("exec request timeout");
}
while (!c.finished)