Fixed read() to not wait on closed socket
This commit is contained in:
@@ -126,7 +126,7 @@ public:
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// TODO: Read directly into user buffer?
|
// TODO: Read directly into user buffer?
|
||||||
if (!rx.size()) {
|
if (!rx.size() && sock_connected) {
|
||||||
at->maintain();
|
at->maintain();
|
||||||
//break;
|
//break;
|
||||||
}
|
}
|
||||||
|
@@ -108,7 +108,7 @@ public:
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// TODO: Read directly into user buffer?
|
// TODO: Read directly into user buffer?
|
||||||
if (!rx.size()) {
|
if (!rx.size() && sock_connected) {
|
||||||
at->maintain();
|
at->maintain();
|
||||||
//break;
|
//break;
|
||||||
}
|
}
|
||||||
|
@@ -123,7 +123,7 @@ public:
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// TODO: Read directly into user buffer?
|
// TODO: Read directly into user buffer?
|
||||||
if (!rx.size()) {
|
if (!rx.size() && sock_connected) {
|
||||||
at->maintain();
|
at->maintain();
|
||||||
//break;
|
//break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user