Skip to content

Commit ab69ea9

Browse files
committed
Fix assertion failure for SSL connections.
Commit cfdf4dc added an assertion that every WaitLatch() or similar handles postmaster death. One place did not, but was missed in review and testing due to the need for an SSL connection. Fix, by asking for WL_EXIT_ON_PM_DEATH. Reported-by: Christoph Berg Discussion: https://postgr.es/m/20181124143845.GA15039%40msg.df7cb.de
1 parent d5890f4 commit ab69ea9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/libpq/be-secure-openssl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,9 @@ be_tls_open_server(Port *port)
406406
* StartupPacketTimeoutHandler() which directly exits.
407407
*/
408408
if (err == SSL_ERROR_WANT_READ)
409-
waitfor = WL_SOCKET_READABLE;
409+
waitfor = WL_SOCKET_READABLE | WL_EXIT_ON_PM_DEATH;
410410
else
411-
waitfor = WL_SOCKET_WRITEABLE;
411+
waitfor = WL_SOCKET_WRITEABLE | WL_EXIT_ON_PM_DEATH;
412412

413413
(void) WaitLatchOrSocket(MyLatch, waitfor, port->sock, 0,
414414
WAIT_EVENT_SSL_OPEN_SERVER);

0 commit comments

Comments
 (0)