mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 09:18:27 +00:00
Fix #160
This commit is contained in:
parent
4f4e6f2140
commit
b5c79bf146
1 changed files with 5 additions and 4 deletions
|
@ -1736,13 +1736,14 @@ inline bool Server::listen_internal() {
|
||||||
is_running_ = true;
|
is_running_ = true;
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
if (svr_sock_ == INVALID_SOCKET) {
|
||||||
|
// The server socket was closed by 'stop' method.
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
auto val = detail::select_read(svr_sock_, 0, 100000);
|
auto val = detail::select_read(svr_sock_, 0, 100000);
|
||||||
|
|
||||||
if (val == 0) { // Timeout
|
if (val == 0) { // Timeout
|
||||||
if (svr_sock_ == INVALID_SOCKET) {
|
|
||||||
// The server socket was closed by 'stop' method.
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue