From efa032740a6b49ab12cf40f471c54d8b45bdc8ee Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 26 Aug 2020 16:24:40 +0200 Subject: [PATCH] Code polish with the fragment handler --- src/dorkbox/network/Server.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dorkbox/network/Server.kt b/src/dorkbox/network/Server.kt index 2b388ce1..27900f80 100644 --- a/src/dorkbox/network/Server.kt +++ b/src/dorkbox/network/Server.kt @@ -184,7 +184,7 @@ open class Server(config: ServerConfiguration = ServerC * Messages larger than this should chunked using an application level chunking protocol. Chunking has better recovery * properties from failure and streams with mechanical sympathy. */ - val initialConnectionHandler = FragmentAssembler { buffer: DirectBuffer, offset: Int, length: Int, header: Header -> + val handshakeHandler = FragmentAssembler { buffer: DirectBuffer, offset: Int, length: Int, header: Header -> // this is processed on the thread that calls "poll". Subscriptions are NOT multi-thread safe! // The sessionId is unique within a Subscription and unique across all Publication's from a sourceIdentity. @@ -230,7 +230,7 @@ open class Server(config: ServerConfiguration = ServerC pollCount = 0 // this checks to see if there are NEW clients on the handshake ports - pollCount += handshakeSubscription.poll(initialConnectionHandler, 100) + pollCount += handshakeSubscription.poll(handshakeHandler, 4) // this checks to see if there are NEW clients via IPC // pollCount += ipcHandshakeSubscription.poll(ipcInitialConnectionHandler, 100)