Skip to content

Commit fde3f8c

Browse files
committed
fix tests
1 parent 13e82c4 commit fde3f8c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/suites/lib/tarantool_server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def connect(self):
4343
self.socket = socket.create_connection((self.host, self.port))
4444
self.socket.setsockopt(socket.SOL_TCP, socket.TCP_NODELAY, 1)
4545
self.is_connected = True
46+
self.socket.recv(256) # skip greating
4647

4748
def disconnect(self):
4849
if self.is_connected:
@@ -60,7 +61,7 @@ def opt_reconnect(self):
6061
Make use of this property and detect whether or not the socket is
6162
dead. Reconnect a dead socket, do nothing if the socket is good."""
6263
try:
63-
if self.socket is None or self.socket.recv(0, socket.MSG_DONTWAIT) == '':
64+
if self.socket is None or self.socket.recv(1, socket.MSG_DONTWAIT|socket.MSG_PEEK) == '':
6465
self.reconnect()
6566
except socket.error as e:
6667
if e.errno == errno.EAGAIN:

0 commit comments

Comments
 (0)