Skip to content

Commit 109aae8

Browse files
author
James William Pye
committed
Listen before starting the thread.
This caused hangs on ubuntu under VMWare.
1 parent 328c7df commit 109aae8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

postgresql/test/test_protocol.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,11 +530,11 @@ def test_SSL_failure(self):
530530
{}
531531
)
532532
exc = None
533+
servsock.listen(1)
533534
def client_thread():
534535
pc.connect(ssl = True)
535536
client = Thread(target = client_thread)
536537
client.start()
537-
servsock.listen(1)
538538
c, addr = servsock.accept()
539539
c.send(b'S')
540540
c.sendall(b'0000000000000000000000')
@@ -558,11 +558,11 @@ def test_bad_negotiation(self):
558558
{}
559559
)
560560
exc = None
561+
servsock.listen(1)
561562
def client_thread():
562563
pc.connect()
563564
client = Thread(target = client_thread)
564565
client.start()
565-
servsock.listen(1)
566566
c, addr = servsock.accept()
567567
c.close()
568568
time.sleep(0.25)

0 commit comments

Comments
 (0)