You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@etch.apache.org by gr...@apache.org on 2011/02/25 22:25:25 UTC

svn commit: r1074705 - /incubator/etch/trunk/binding-c/runtime/c/src/main/transport/etch_tcp_connection.c

Author: grandyho
Date: Fri Feb 25 21:25:24 2011
New Revision: 1074705

URL: http://svn.apache.org/viewvc?rev=1074705&view=rev
Log:
ETCH-155 added apr_socket_shutdown to socket_closex

Modified:
    incubator/etch/trunk/binding-c/runtime/c/src/main/transport/etch_tcp_connection.c

Modified: incubator/etch/trunk/binding-c/runtime/c/src/main/transport/etch_tcp_connection.c
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-c/runtime/c/src/main/transport/etch_tcp_connection.c?rev=1074705&r1=1074704&r2=1074705&view=diff
==============================================================================
--- incubator/etch/trunk/binding-c/runtime/c/src/main/transport/etch_tcp_connection.c (original)
+++ incubator/etch/trunk/binding-c/runtime/c/src/main/transport/etch_tcp_connection.c Fri Feb 25 21:25:24 2011
@@ -659,6 +659,11 @@ int etch_tcpconx_closex(etch_tcp_connect
         if (NULL != cx->socket && is_linger)
             apr_socket_opt_set(cx->socket, APR_SO_LINGER, conx->linger);
 
+        if (NULL != cx->socket && 0 != (arc = apr_socket_shutdown(cx->socket,APR_SHUTDOWN_READWRITE))) {
+            cx->on_event(conx, ETCH_CONXEVT_CLOSERR, 3, (void*)(size_t)arc);
+            result = -1;
+        }
+
         if (NULL != cx->socket && 0 != (arc = apr_socket_close(cx->socket))) {
             cx->on_event(conx, ETCH_CONXEVT_CLOSERR, 3, (void*)(size_t)arc);
             result = -1;