On a busy system [e]poll() on the server will mark both the
old connection fd and also the listening fd as readable.
epoll() returns the events in order, so the server processes the
disconnect first.
With poll() we don't have an order of the events and the
server is likely to process the connect before the disconnect.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
import sys
import os
+import time
sys.path.insert(0, "bin/python")
os.environ["PYTHONUNBUFFERED"] = "1"
ack = self.do_generic_bind(ctx=ctx)
self._disconnect("test_assoc_group_fail2")
+ self.assertNotConnected()
+ time.sleep(0.5)
self.connect()
ack2 = self.do_generic_bind(ctx=ctx,assoc_group_id=ack.u.assoc_group_id,