summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibProtocol/WebSocket.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibProtocol/WebSocket.cpp')
-rw-r--r--Userland/Libraries/LibProtocol/WebSocket.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibProtocol/WebSocket.cpp b/Userland/Libraries/LibProtocol/WebSocket.cpp
index 5d497e1a18..c97f4027d3 100644
--- a/Userland/Libraries/LibProtocol/WebSocket.cpp
+++ b/Userland/Libraries/LibProtocol/WebSocket.cpp
@@ -27,7 +27,9 @@ void WebSocket::send(ByteBuffer binary_or_text_message, bool is_text)
void WebSocket::send(StringView text_message)
{
- send(ByteBuffer::copy(text_message.bytes()), true);
+ auto data_result = ByteBuffer::copy(text_message.bytes());
+ VERIFY(data_result.has_value());
+ send(data_result.release_value(), true);
}
void WebSocket::close(u16 code, String reason)