summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNanang Izzuddin <nanang@teluu.com>2009-11-11 07:14:28 +0000
committerNanang Izzuddin <nanang@teluu.com>2009-11-11 07:14:28 +0000
commit25fd5c2d7845917491dad6520619a5bdf09a9ee2 (patch)
tree265de61bf2f6be990f68087b6fd9b8742e581ac7
parenta21a37874c4a417cb8c9bf2a8425af33dd504e99 (diff)
Ticket #957: Updated SSL sock performance test to avoid false connected state problem caused by server listen backlog excess (problem examined on mac platform).
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3018 74dad513-b988-da41-8d7b-12977e46ad98
-rw-r--r--pjlib/src/pjlib-test/ssl_sock.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/pjlib/src/pjlib-test/ssl_sock.c b/pjlib/src/pjlib-test/ssl_sock.c
index e3563b67..8302e8f1 100644
--- a/pjlib/src/pjlib-test/ssl_sock.c
+++ b/pjlib/src/pjlib-test/ssl_sock.c
@@ -1048,6 +1048,20 @@ static int perf_test(unsigned clients, unsigned ms_handshake_timeout)
cli_err++;
continue;
}
+
+ /* Give chance to server to accept this client */
+ {
+ unsigned n = 5;
+
+#ifdef PJ_SYMBIAN
+ while(n && pj_symbianos_poll(-1, 1000))
+ n--;
+#else
+ pj_time_val delay = {0, 100};
+ while(n && pj_ioqueue_poll(ioqueue, &delay) > 0)
+ n--;
+#endif
+ }
}
/* Get start timestamp */