summaryrefslogtreecommitdiff
path: root/databases/foundationdb/files/patch-flow_Net2.actor.cpp
blob: ee4b062138873ffaeac78a3192df193cceb97451 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--- flow/Net2.actor.cpp.orig	2018-05-11 01:30:59 UTC
+++ flow/Net2.actor.cpp
@@ -56,7 +56,7 @@ uint64_t compatibleProtocolVersionMask = 0xfffffffffff
 uint64_t minValidProtocolVersion       = 0x0FDB00A200060001LL;
 
 
-#if defined(__linux__)
+#if defined(__linux__) || defined(__FreeBSD__)
 #include <execinfo.h>
 
 volatile double net2liveness = 0;
@@ -403,8 +403,7 @@ class Connection : public IConnection, ReferenceCounte
 
 	void init() {
 		// Socket settings that have to be set after connect or accept succeeds
-		boost::asio::socket_base::non_blocking_io nbio(true);
-		socket.io_control(nbio);
+		socket.non_blocking(true);
 		socket.set_option(boost::asio::ip::tcp::no_delay(true));
 	}