summaryrefslogtreecommitdiff
path: root/pjlib/src/pj/ioqueue_select.c
diff options
context:
space:
mode:
Diffstat (limited to 'pjlib/src/pj/ioqueue_select.c')
-rw-r--r--pjlib/src/pj/ioqueue_select.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/pjlib/src/pj/ioqueue_select.c b/pjlib/src/pj/ioqueue_select.c
index 8dd01720..438b37a2 100644
--- a/pjlib/src/pj/ioqueue_select.c
+++ b/pjlib/src/pj/ioqueue_select.c
@@ -894,8 +894,21 @@ PJ_DEF(int) pj_ioqueue_poll( pj_ioqueue_t *ioqueue, const pj_time_val *timeout)
/* Unlock ioqueue before select(). */
pj_lock_release(ioqueue->lock);
+#if defined(PJ_WIN32_WINPHONE8) && PJ_WIN32_WINPHONE8
+ count = 0;
+ __try {
+#endif
+
count = pj_sock_select(nfds+1, &rfdset, &wfdset, &xfdset,
timeout);
+
+#if defined(PJ_WIN32_WINPHONE8) && PJ_WIN32_WINPHONE8
+ /* Ignore Invalid Handle Exception raised by select().*/
+ }
+ __except (GetExceptionCode() == STATUS_INVALID_HANDLE ?
+ EXCEPTION_CONTINUE_EXECUTION : EXCEPTION_CONTINUE_SEARCH) {
+ }
+#endif
if (count == 0)
return 0;