Author: cgutman
Date: Mon Aug 12 04:58:22 2013
New Revision: 59707
URL:
http://svn.reactos.org/svn/reactos?rev=59707&view=rev
Log:
[LWIP]
- Indicate the graceful close before calling the FIN event handler
Modified:
trunk/reactos/lib/drivers/lwip/src/rostcp.c
Modified: trunk/reactos/lib/drivers/lwip/src/rostcp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/lwip/src/rostc…
==============================================================================
--- trunk/reactos/lib/drivers/lwip/src/rostcp.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/lwip/src/rostcp.c [iso-8859-1] Mon Aug 12 04:58:22 2013
@@ -251,12 +251,15 @@
{
Connection->SocketContext = NULL;
tcp_arg(pcb, NULL);
- TCPFinEventHandler(Connection, ERR_OK);
}
- else
+
+ /* Indicate the graceful close event */
+ TCPRecvEventHandler(arg);
+
+ /* If the PCB is gone, clean up the connection */
+ if (Connection->SendShutdown)
{
- /* Remotely initiated close */
- TCPRecvEventHandler(arg);
+ TCPFinEventHandler(Connection, ERR_CLSD);
}
}