From fc089a299e6f663164eb85deb3cb7dc86f8fcbb4 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 25 Feb 2015 16:37:16 -0800 Subject: [PATCH] umtrx: max timeout for tx async handler flush --- host/umtrx_io_impl.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/host/umtrx_io_impl.cpp b/host/umtrx_io_impl.cpp index 610c72b7..c950aab8 100644 --- a/host/umtrx_io_impl.cpp +++ b/host/umtrx_io_impl.cpp @@ -404,7 +404,12 @@ static void handle_tx_async_msgs( } stop_flow_control(); - while (not xport->get_recv_buff()){};//flush after fc off + //flush after fc off, max time of 1s + size_t i = 0; + while (not xport->get_recv_buff(0.01)) + { + if (i++ > 100) break; + } } /***********************************************************************