mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
fix(tests): Don't return the same port from PortPicker.get_available_port twice (#1083)
This commit is contained in:
parent
70cf436c05
commit
fc66dbb2cf
1 changed files with 2 additions and 1 deletions
|
@ -150,7 +150,8 @@ class PortPicker():
|
|||
def get_available_port(self):
|
||||
while not self.is_port_available(self.next_port):
|
||||
self.next_port += 1
|
||||
return self.next_port
|
||||
self.next_port += 1
|
||||
return self.next_port - 1
|
||||
|
||||
def is_port_available(self, port):
|
||||
import socket
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue