Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitbe94d8f

Browse files
committed
Keep Tcl from getting confused if backend closes connection
when a notify is installed.
1 parent5d2cf6a commitbe94d8f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

‎src/interfaces/libpgtcl/pgtclId.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Copyright (c) 1994, Regents of the University of California
1313
*
1414
* IDENTIFICATION
15-
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclId.c,v 1.16 1998/09/21 01:02:03 momjian Exp $
15+
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclId.c,v 1.17 1999/01/17 21:14:33 tgl Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -582,6 +582,15 @@ PgNotifyTransferEvents(Pg_ConnectionId * connid)
582582
Tcl_QueueEvent((Tcl_Event*)event,TCL_QUEUE_TAIL);
583583
free(notify);
584584
}
585+
586+
/*
587+
* This is also a good place to check for unexpected closure of the
588+
* connection (ie, backend crash), in which case we must shut down the
589+
* notify event source to keep Tcl from trying to select() on the now-
590+
* closed socket descriptor.
591+
*/
592+
if (PQsocket(connid->conn)<0)
593+
PgStopNotifyEventSource(connid);
585594
}
586595

587596
/*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp