8000 Here the fix for the first assertion failure I had which killed · s-monk/postgres@93c7dcf · GitHub
[go: up one dir, main page]

Skip to content

Commit 93c7dcf

Browse files
committed
Here the fix for the first assertion failure I had which killed
my postmaster 1.07. It's really simple, the loop dealing with all sockets can't handle more than one ready socket :-) A simple logic error dealing with lists. OR IS THERE ANY REASON FOR SETTING curr TO 0? Submitted by: Carsten Heyl <Heyl@nads.de>
1 parent 9b1e589 commit 93c7dcf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/backend/postmaster/postmaster.c

Lines changed: 5 additions & 4 deletions
58B9
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.3.2.2 1996/10/02 21:36:32 scrappy Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.3.2.3 1996/10/04 20:33:18 scrappy Exp $
1414
*
1515
* NOTES
1616
*
@@ -403,7 +403,7 @@ ServerLoop()
403403
int serverFd = ServerSock;
404404
fd_set rmask, basemask;
405405
int nSockets, nSelected, status, newFd;
406-
Dlelem *prev, *curr;
406+
Dlelem *next, *curr;
407407
/* int orgsigmask = sigblock(0); */
408408
sigset_t oldsigmask, newsigmask;
409409

@@ -541,10 +541,11 @@ ServerLoop()
541541
}
542542
FD_CLR(port->sock, &basemask);
543543
StreamClose(port->sock);
544-
prev = DLGetPred(curr);
544+
next = DLGetPred(curr);
545545
DLRemove(curr);
546546
DLFreeElem(curr);
547-
curr = 0;
547+
curr = next;
548+
continue;
548549
}
549550
curr = DLGetSucc(curr);
550551
}

0 commit comments

Comments
 (0)
0