summaryrefslogtreecommitdiff
path: root/modules/websocket/wsl_server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/websocket/wsl_server.cpp')
-rw-r--r--modules/websocket/wsl_server.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/websocket/wsl_server.cpp b/modules/websocket/wsl_server.cpp
index dc5b23c31e..ccdb6e9292 100644
--- a/modules/websocket/wsl_server.cpp
+++ b/modules/websocket/wsl_server.cpp
@@ -95,8 +95,8 @@ bool WSLServer::PendingPeer::_parse_request(const Vector<String> p_protocols) {
return true;
}
-Error WSLServer::PendingPeer::do_handshake(const Vector<String> p_protocols) {
- if (OS::get_singleton()->get_ticks_msec() - time > WSL_SERVER_TIMEOUT) {
+Error WSLServer::PendingPeer::do_handshake(const Vector<String> p_protocols, uint64_t p_timeout) {
+ if (OS::get_singleton()->get_ticks_msec() - time > p_timeout) {
return ERR_TIMEOUT;
}
if (use_ssl) {
@@ -188,7 +188,7 @@ void WSLServer::poll() {
List<Ref<PendingPeer>> remove_peers;
for (List<Ref<PendingPeer>>::Element *E = _pending.front(); E; E = E->next()) {
Ref<PendingPeer> ppeer = E->get();
- Error err = ppeer->do_handshake(_protocols);
+ Error err = ppeer->do_handshake(_protocols, handshake_timeout);
if (err == ERR_BUSY) {
continue;
} else if (err != OK) {
@@ -301,7 +301,7 @@ Error WSLServer::set_buffers(int p_in_buffer, int p_in_packets, int p_out_buffer
}
WSLServer::WSLServer() {
- _server.instance();
+ _server.instantiate();
}
WSLServer::~WSLServer() {