2013/5/2 Zaher Dirkey <parm...@gmail.com>

>
> On Thu, May 2, 2013 at 11:47 PM, silvioprog <silviop...@gmail.com> wrote:
>
>> I tested current code on Linux, but unfortunately when I try to close,
>> the app stays locked. :|
>
>
> Yes headache :P
>
> Do not close, i use Shutdown
>
> function TmnSocket.DoShutdown(How: TmnShutdown): TmnError;
> const
>   cHow: array[TmnShutdown] of Integer = (0, SHUT_RD, SHUT_WR, SHUT_RDWR);
> var
>   c: Integer;
> begin
>   CheckActive;
>   c := fpshutdown(FHandle, cHow[How]);
>   if c = SOCKET_ERROR then
>   begin
>     Result := erFail;
> //    RaiseLastOSError; do not raise an error, maybe it is disconnected by
> the other side
>   end
>   else
>     Result := erNone;
> end;
>
> --
> I am using last revision of Lazarus, FPC 2.6 on Windows XP SP3
>
> Best Regards
> Zaher Dirkey
>

I tried with fpshotdown and closesocket, like this:

https://github.com/graemeg/freepascal/blob/master/packages/fcl-web/src/base/custfcgi.pp#L614

But, same error.

This is not the most serious problem. My dilemma now is to close the app. I
hate working with threads. -.-'

-- 
Silvio Clécio
My public projects - github.com/silvioprog
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to