Fixed read() to not wait on closed socket

This commit is contained in:
SRGDamia1
2017-10-15 21:09:00 -04:00
parent 327c500b3e
commit c7d79f40dd
3 changed files with 3 additions and 3 deletions

View File

@@ -126,7 +126,7 @@ public:
continue;
}
// TODO: Read directly into user buffer?
if (!rx.size()) {
if (!rx.size() && sock_connected) {
at->maintain();
//break;
}

View File

@@ -108,7 +108,7 @@ public:
continue;
}
// TODO: Read directly into user buffer?
if (!rx.size()) {
if (!rx.size() && sock_connected) {
at->maintain();
//break;
}

View File

@@ -123,7 +123,7 @@ public:
continue;
}
// TODO: Read directly into user buffer?
if (!rx.size()) {
if (!rx.size() && sock_connected) {
at->maintain();
//break;
}