Fixes end of stream at handling websockets
This commit is contained in:
parent
ff1444d664
commit
37efb02e73
2 changed files with 3 additions and 3 deletions
|
|
@ -165,6 +165,7 @@ namespace Yavsc.Services
|
|||
received = await liveHandler.Socket.ReceiveAsync(sBuffer, liveHandler.TokenSource.Token);
|
||||
|
||||
_logger.LogInformation($"Received bytes : {received.Count}");
|
||||
_logger.LogInformation($"segment : offset: {sBuffer.Offset} count: {sBuffer.Count}");
|
||||
_logger.LogInformation($"Is the end : {received.EndOfMessage}");
|
||||
fsInputQueue.Enqueue(sBuffer);
|
||||
if (received.CloseStatus.HasValue)
|
||||
|
|
|
|||
|
|
@ -64,10 +64,9 @@ namespace Yavsc.ViewModels.Streaming
|
|||
|
||||
logger.LogInformation($"writing {buffer.Array.Length} bytes...");
|
||||
|
||||
await dest.WriteAsync(buffer.Array, 0, buffer.Array.Length);
|
||||
await dest.WriteAsync(buffer.Array, buffer.Offset, buffer.Count);
|
||||
logger.LogInformation($"done.");
|
||||
usage += buffer.Array.Length;
|
||||
|
||||
usage += buffer.Count;
|
||||
}
|
||||
if (usage >= user.DiskQuota) break;
|
||||
if (queue.Count==0 && !isEndOfInput()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue