Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
RadKesvat committed Dec 22, 2023
1 parent d060708 commit a59219c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/foreign_server.nim
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,12 @@ proc processConnection(client: Connection) {.async.} =
packForSend(data, remote.id, remote.port.uint16)

await client.twriter.write(data)
if globals.log_data_len: echo &"[processRemote] Sent {data.len()} bytes -> client"
echo &"[processRemote] Sent {data.len()} bytes -> client"

if client.isClosing:
# await client.twriter.finish()
client = await acquireClientConnection(true)

echo "-----------------------------CHANGE--------------------------------------"
if client == nil:
if globals.log_conn_error: echo "[Error] [processRemote] [loop]: ", "no client for tcp !"
break
Expand Down Expand Up @@ -339,7 +339,7 @@ proc poolController() {.async.} =
await sleepAsync(3000)
if upload:
block initialWriteToOpenBandWidth:
for i in 0..40:
for i in 0..5:
var len = 3000+rand(globals.random_str.len() - 3000)
let random_start = rand(1500)
let full_len = min((len+random_start), globals.random_str.len() - random_start)
Expand Down

0 comments on commit a59219c

Please sign in to comment.