1
0
mirror of https://github.com/lidgren/lidgren-network-gen3.git synced 2026-05-15 14:46:29 +09:00

Added recycling to a few samples that lacked it

This commit is contained in:
lidgren
2013-05-08 13:26:17 +00:00
parent 4b872d3454
commit 4dffa9dc9b
7 changed files with 8 additions and 2 deletions

View File

@@ -65,6 +65,7 @@ namespace FileStreamServer
}
break;
}
s_server.Recycle(inc);
}
// stream to all connections

View File

@@ -31,8 +31,8 @@ namespace FileStreamServer
if (freeWindowSlots > 0)
{
// send another part of the file!
int remaining = (int)(m_inputStream.Length - m_sentOffset);
int sendBytes = (remaining > m_chunkLen ? m_chunkLen : remaining);
long remaining = m_inputStream.Length - m_sentOffset;
int sendBytes = (remaining > m_chunkLen ? m_chunkLen : (int)remaining);
// just assume we can read the whole thing in one Read()
m_inputStream.Read(m_tmpBuffer, 0, sendBytes);