[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Terminating the client connection

At 07:35 AM 4/22/99 +0200, Paul Higgs (EBC) wrote:
>I have found during testing of the NT port that if the client application (I
>was testing with ldapsearch) abnormally terminated (with ctrl-c on NT), the
>thread processing the client request continued running on the slapd server.

The thread, I hope, completes eventually.

>I experimented for a while with finding the best way to handle this and have
>settled on the following changed connection_close() modifications.
>Essentially what I do is set the abandon flag for each active operation on
>the connection.

Yes, active ops should be abandoned on first attempt to close
a connection.

>I'm not sure if the same should be done for those operations
>pointed to by Connection.c_pending_ops

They can be removed.

Also, I'm thinking of calling shutdown(,SHUT_RDWR) on first
attempt to close and then wake any write blocked operations
on the connection...