refactor(websockets): Rename connectedWebSocketContext()

Signed-off-by: Ryan Russell <git@ryanrussell.org>
This commit is contained in:
Ryan Russell
2022-07-08 18:04:32 -05:00
committed by Jarred Sumner
parent 547ac721fa
commit 0acf8a6618
2 changed files with 3 additions and 3 deletions

View File

@@ -145,7 +145,7 @@ private:
public:
template<bool isSSL, bool isServer>
us_socket_context_t* connnectedWebSocketContext()
us_socket_context_t* connectedWebSocketContext()
{
if constexpr (isSSL) {
if (!m_connected_ssl_client_websockets_ctx) {

View File

@@ -909,11 +909,11 @@ void WebSocket::didConnect(us_socket_t* socket, char* bufferedData, size_t buffe
{
this->m_upgradeClient = nullptr;
if (m_isSecure) {
us_socket_context_t* ctx = (us_socket_context_t*)this->scriptExecutionContext()->connnectedWebSocketContext<true, false>();
us_socket_context_t* ctx = (us_socket_context_t*)this->scriptExecutionContext()->connectedWebSocketContext<true, false>();
this->m_connectedWebSocket.clientSSL = Bun__WebSocketClientTLS__init(this, socket, ctx, this->scriptExecutionContext()->jsGlobalObject());
this->m_connectedWebSocketKind = ConnectedWebSocketKind::ClientSSL;
} else {
us_socket_context_t* ctx = (us_socket_context_t*)this->scriptExecutionContext()->connnectedWebSocketContext<false, false>();
us_socket_context_t* ctx = (us_socket_context_t*)this->scriptExecutionContext()->connectedWebSocketContext<false, false>();
this->m_connectedWebSocket.client = Bun__WebSocketClient__init(this, socket, ctx, this->scriptExecutionContext()->jsGlobalObject());
this->m_connectedWebSocketKind = ConnectedWebSocketKind::Client;
}