1
0
mirror of https://github.com/prirun/p50em.git synced 2026-02-01 05:52:03 +00:00

devpnc: after accept, make fd non-blocking to avoid deadlock when multiple emulators make connect requests, then accept(), then block reading uid that never comes.

This commit is contained in:
Jim
2020-02-26 21:39:21 -05:00
parent 9de65ca516
commit bf3c1a3df2

View File

@@ -446,6 +446,7 @@ void pncaccept(time_t timenow) {
goto disc;
}
TRACE(T_RIO, " new PNC connection, fd %d\n", fd);
pncinitfd(fd);
}
/* PNC connect request seen:
@@ -497,7 +498,6 @@ void pncaccept(time_t timenow) {
ni[i].cstate = PNCCSAUTH;
ni[i].rcvlen = 0;
ni[i].fd = fd;
pncinitfd(fd);
fd = -1;
return;