Re: [HACKERS][PATCH] adding simple sock check for windows - Mailing list pgsql-hackers

From Amit Kapila
Subject Re: [HACKERS][PATCH] adding simple sock check for windows
Date
Msg-id CAA4eK1+1oyxiFsyD-rFzCizCaY=F8K-D76A_PPwVO9131H3kow@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS][PATCH] adding simple sock check for windows  (CharSyam <charsyam@gmail.com>)
Responses Re: [HACKERS][PATCH] adding simple sock check for windows
List pgsql-hackers
On Sat, Mar 31, 2018 at 11:42 AM, CharSyam <charsyam@gmail.com> wrote:
> Hi, Amit, It's good question. I also thought about it.
>
> But, I want to leave original code intention.
>
> Actually I think there is no case ( slot->sock is not PGINVALID_SOCKET
> and slot->sock < 0)
>
> but if original code want to check (sock < -1)
>

If you see the code of PQsocket, then that won't be possible.


> I think it is better to leave that condition.
>
> but I think slot->sock == PGINVALID_SOCKET is enough
>

It is up to you, but I don't see any reason to retain the old check.

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: CharSyam
Date:
Subject: Re: [HACKERS][PATCH] adding simple sock check for windows
Next
From: CharSyam
Date:
Subject: Re: [HACKERS][PATCH] adding simple sock check for windows