summaryrefslogtreecommitdiff
path: root/src/libutp/utp_internal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutp/utp_internal.cpp')
-rw-r--r--src/libutp/utp_internal.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/libutp/utp_internal.cpp b/src/libutp/utp_internal.cpp
index f2389395..93117e97 100644
--- a/src/libutp/utp_internal.cpp
+++ b/src/libutp/utp_internal.cpp
@@ -2808,15 +2808,18 @@ int utp_connect(utp_socket *conn, const struct sockaddr *to, socklen_t tolen)
// we have to check every case
UTPSocket* LookupAdjacent(utp_context *ctx, PackedSockAddr const& addr, uint32 const id) {
auto key = UTPSocketKey{ addr, id };
- if (auto* conn = ctx->utp_sockets.lookup(key); conn != nullptr)
+ auto* conn = ctx->utp_sockets.lookup(key);
+ if (conn != nullptr)
return conn;
key.recv_id = id + 1;
- if (auto* conn = ctx->utp_sockets.lookup(key); conn != nullptr && conn->conn_id_send == id)
+ conn = ctx->utp_sockets.lookup(key);
+ if (conn != nullptr && conn->conn_id_send == id)
return conn;
key.recv_id = id - 1;
- if (auto* conn = ctx->utp_sockets.lookup(key); conn != nullptr && conn->conn_id_send == id)
+ conn = ctx->utp_sockets.lookup(key);
+ if (conn != nullptr && conn->conn_id_send == id)
return conn;
return nullptr;