Made buffer size a constant and I've put it to 4096.
This commit is contained in:
parent
74bfdf8ed5
commit
7da095f1d2
@ -4,6 +4,8 @@ from app.app import Application as BaseApplication
|
||||
|
||||
from shadowssh import log
|
||||
|
||||
BUFFER_SIZE = 4096
|
||||
|
||||
|
||||
class Application(BaseApplication):
|
||||
|
||||
@ -29,7 +31,7 @@ class Application(BaseApplication):
|
||||
|
||||
async def stream(self, reader, writer, port):
|
||||
while True:
|
||||
chunk = await reader.read(64)
|
||||
chunk = await reader.read(BUFFER_SIZE)
|
||||
if not chunk:
|
||||
writer.close()
|
||||
log.info("Forward connection closed.")
|
||||
|
Loading…
Reference in New Issue
Block a user