From ceecdc62ab73e5b726630345865a512c780c134e Mon Sep 17 00:00:00 2001 From: "lpleahy leroy.p.leahy" Date: Fri, 13 Dec 2013 19:22:39 +0000 Subject: [PATCH] Fix the non-blocking behavior for connect. The behavior was correct if the code polled the connect routine but was not correct when using select to complete the asynchronous request. This change fixes the select case by moving where some of the operations performed upon the connection completion. Signed-off-by: lpleahy leroy.p.leahy@intel.com Reviewed-by: Daniel Moura oxesoft@gmail.com git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14984 6f19259b-4bc3-4df7-8a09-765794883524 --- StdLib/EfiSocketLib/Socket.c | 12 ++---------- StdLib/EfiSocketLib/Tcp4.c | 8 +++++++- StdLib/EfiSocketLib/Tcp6.c | 8 +++++++- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/StdLib/EfiSocketLib/Socket.c b/StdLib/EfiSocketLib/Socket.c index b8011951b4..c7084a1a09 100644 --- a/StdLib/EfiSocketLib/Socket.c +++ b/StdLib/EfiSocketLib/Socket.c @@ -1825,15 +1825,7 @@ EslSocketConnect ( // Set the next state if connected // if ( EFI_NOT_READY != Status ) { - if ( !EFI_ERROR ( Status )) { - pSocket->State = SOCKET_STATE_CONNECTED; - - // - // Start the receive operations - // - EslSocketRxStart ( pSocket->pPortList ); - } - else { + if ( EFI_ERROR ( Status )) { pSocket->State = SOCKET_STATE_BOUND; } } @@ -5141,7 +5133,7 @@ EslSocketRxPoll (