mirror of
https://github.com/TalAloni/SMBLibrary.git
synced 2025-05-02 03:47:48 +02:00
Do not try to prefetch write-only streams
This commit is contained in:
parent
8c7b17426c
commit
af936b2217
1 changed files with 15 additions and 12 deletions
|
@ -25,6 +25,8 @@ namespace Utilities
|
||||||
public PrefetchedStream(Stream stream)
|
public PrefetchedStream(Stream stream)
|
||||||
{
|
{
|
||||||
m_stream = stream;
|
m_stream = stream;
|
||||||
|
if (m_stream.CanRead)
|
||||||
|
{
|
||||||
new Thread(delegate()
|
new Thread(delegate()
|
||||||
{
|
{
|
||||||
lock (m_syncLock)
|
lock (m_syncLock)
|
||||||
|
@ -42,6 +44,7 @@ namespace Utilities
|
||||||
}
|
}
|
||||||
}).Start();
|
}).Start();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override int Read(byte[] buffer, int offset, int count)
|
public override int Read(byte[] buffer, int offset, int count)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue