Skip to content

Commit

Permalink
KTOR-6963 Fix darwin maxFrameSize option
Browse files Browse the repository at this point in the history
  • Loading branch information
e5l committed Oct 7, 2024
1 parent a34c260 commit 4e49781
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ public class WebSockets internal constructor(
}

LOGGER.trace("Receive websocket session from ${context.request.url}: $session")

if (plugin.maxFrameSize != Long.MAX_VALUE) {
session.maxFrameSize = plugin.maxFrameSize
}

val clientSession: ClientWebSocketSession = when (info.type) {
DefaultClientWebSocketSession::class -> {
val defaultSession = plugin.convertSessionToDefault(session)
Expand All @@ -201,7 +206,9 @@ public class WebSockets internal constructor(
}
}

else -> DelegatingClientWebSocketSession(context, session)
else -> {
DelegatingClientWebSocketSession(context, session)
}
}

proceedWith(HttpResponseContainer(info, clientSession))
Expand Down

0 comments on commit 4e49781

Please sign in to comment.