Skip to content

Commit 33f9bf6

Browse files
committed
manual ci start
check for null
1 parent a130dca commit 33f9bf6

3 files changed

Lines changed: 25 additions & 21 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
name: CI
22

33
on:
4-
pull_request:
5-
branches:
6-
- main
4+
workflow_dispatch:
75

86
jobs:
97
build:
10-
runs-on: ubuntu-22.04
8+
runs-on: ubuntu-latest
119
services:
1210
# Docker without TLS (plain TCP) !DEPRECATED! with next docker release
1311
docker-no-tls:

src/Docker.DotNet/Microsoft.Net.Http.Client/BufferedReadStream.cs

Lines changed: 20 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public async Task<string> ReadLineAsync(CancellationToken cancellationToken)
165165

166166
var lfIndex = -1;
167167

168-
bool crlfFound;
168+
bool crlfFound = false;
169169

170170
do
171171
{
@@ -177,23 +177,27 @@ public async Task<string> ReadLineAsync(CancellationToken cancellationToken)
177177
.ConfigureAwait(false);
178178
}
179179

180-
var c = (char)_buffer[_bufferOffset];
181-
line.Append(c);
182-
183-
_bufferOffset++;
184-
_bufferCount--;
185-
186-
switch (c)
180+
// see https://github.com/dotnet/runtime/issues/107051
181+
if (_bufferCount != 0)
187182
{
188-
case '\r':
189-
crIndex = line.Length;
190-
break;
191-
case '\n':
192-
lfIndex = line.Length;
193-
break;
183+
var c = (char)_buffer[_bufferOffset];
184+
line.Append(c);
185+
186+
_bufferOffset++;
187+
_bufferCount--;
188+
189+
switch (c)
190+
{
191+
case '\r':
192+
crIndex = line.Length;
193+
break;
194+
case '\n':
195+
lfIndex = line.Length;
196+
break;
197+
}
198+
199+
crlfFound = crIndex + 1 == lfIndex;
194200
}
195-
196-
crlfFound = crIndex + 1 == lfIndex;
197201
}
198202
while (!crlfFound);
199203

test/Docker.DotNet.Tests/TestFixture.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.IO;
2+
using System.Net;
23
using System.Net.Security;
34
using System.Security.Cryptography.X509Certificates;
45
using Docker.DotNet.X509;
@@ -221,7 +222,8 @@ public static IEnumerable<object[]> GetDockerClientTypes()
221222
.Select(t => new object[] { t });
222223
}
223224

224-
return allClients.Select(t => new object[] { t });
225+
//return allClients.Select(t => new object[] { t });
226+
return allClients.Where(t => t == TestClientsEnum.ManagedHttps).Select(t => new object[] { t });
225227
}
226228

227229
public static IEnumerable<TestDaemonsEnum> GetDockerDaemonTypes()

0 commit comments

Comments
 (0)