Skip to content

Commit 8c516b7

Browse files
committed
Add TCP_NODELAY back
The connector is synchronous, packets are often small and lack of this option can lead to delays. This option was removed in 341c0c1 due to unknown reasons. Fixes #127.
1 parent 0b6e321 commit 8c516b7

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

tarantool/connection.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ def connect_tcp(self):
157157
self._socket = socket.create_connection(
158158
(self.host, self.port), timeout=self.connection_timeout)
159159
self._socket.settimeout(self.socket_timeout)
160+
self._socket.setsockopt(socket.SOL_TCP, socket.TCP_NODELAY, 1)
160161
except socket.error as e:
161162
self.connected = False
162163
raise NetworkError(e)

0 commit comments

Comments
 (0)