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:
2
devpnc.h
2
devpnc.h
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user