Added support for sockets pretending to not be sockets even though they are really sockets. Sockets.
This commit is contained in:
parent
b8a5196a89
commit
9d34ad7f5b
1 changed files with 4 additions and 2 deletions
|
@ -515,8 +515,10 @@ int Socket::Connection::iread(void * buffer, int len, int flags) {
|
|||
if (sock >= 0) {
|
||||
r = recv(sock, buffer, len, flags);
|
||||
} else {
|
||||
//(pipes[1] >=0) {
|
||||
r = read(pipes[1], buffer, len);
|
||||
r = recv(pipes[1], buffer, len, flags);
|
||||
if (r < 0 && errno == ENOTSOCK){
|
||||
r = read(pipes[1], buffer, len);
|
||||
}
|
||||
}
|
||||
if (r < 0) {
|
||||
switch (errno) {
|
||||
|
|
Loading…
Add table
Reference in a new issue