diff --git a/servers/slapd/connection.c b/servers/slapd/connection.c index 83dd702d30..674b04de85 100644 --- a/servers/slapd/connection.c +++ b/servers/slapd/connection.c @@ -1655,8 +1655,6 @@ int connection_write(ber_socket_t s) c = connection_get( s ); - slapd_clr_write( s, 0); - if( c == NULL ) { Debug( LDAP_DEBUG_ANY, "connection_write(%ld): no connection!\n", @@ -1666,6 +1664,8 @@ int connection_write(ber_socket_t s) return -1; } + slapd_clr_write( s, 0); + c->c_n_write++; Debug( LDAP_DEBUG_TRACE,