summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2022-02-23 15:23:48 +0100
committerSimon Rettberg2022-02-23 15:23:48 +0100
commit856849421c977f4a97aa420fb6b417cf7e9658c2 (patch)
treebb57cbe56dfaf34204167260ad1e9f79d1684c56
parent[KERNEL] Refactor to use workqueues and blk-mq only (diff)
downloaddnbd3-856849421c977f4a97aa420fb6b417cf7e9658c2.tar.gz
dnbd3-856849421c977f4a97aa420fb6b417cf7e9658c2.tar.xz
dnbd3-856849421c977f4a97aa420fb6b417cf7e9658c2.zip
[KERNEL] Fix copy&paste error (passing wrong sock)
-rw-r--r--src/kernel/net.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/net.c b/src/kernel/net.c
index f5806de..94a7ff0 100644
--- a/src/kernel/net.c
+++ b/src/kernel/net.c
@@ -356,9 +356,9 @@ error:
dev_info(dnbd3_device_to_dev(dev), "server %pISpc is faster (%lluµs vs. %lluµs)\n",
&best_server,
(unsigned long long)best_rtt, (unsigned long long)dev->cur_server.rtt);
- set_socket_timeout(sock, false, // recv
+ set_socket_timeout(best_sock, false, // recv
MAX(best_rtt / 1000, SOCKET_TIMEOUT_RECV * 1000) + 500);
- set_socket_timeout(sock, true, // send
+ set_socket_timeout(best_sock, true, // send
MAX(best_rtt / 1000, SOCKET_TIMEOUT_SEND * 1000) + 500);
if (dnbd3_set_primary_connection(dev, best_sock, &best_server, remote_version) != 0)
sock_release(best_sock);