File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 29
29
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
30
30
* Portions Copyright (c) 1994, Regents of the University of California
31
31
*
32
- * $Id: pqcomm.c,v 1.120 2001/08/07 10:44:15 petere Exp $
32
+ * $Id: pqcomm.c,v 1.121 2001/08/07 15:55:16 tgl Exp $
33
33
*
34
34
*-------------------------------------------------------------------------
35
35
*/
@@ -706,9 +706,13 @@ pq_eof(void)
706
706
707
707
res = recv (MyProcPort -> sock , & x , 1 , MSG_PEEK );
708
708
709
- if (res == -1 )
709
+ if (res < 0 )
710
+ {
711
+ /* don't try to elog here... */
710
712
fprintf (stderr , "pq_eof: recv() failed: %s\n" , strerror (errno ));
711
- else if (res == 0 )
713
+ return EOF ;
714
+ }
715
+ if (res == 0 )
712
716
return EOF ;
713
717
else
714
718
return 0 ;
You can’t perform that action at this time.
0 commit comments