This commit is contained in:
yhirose committed 2019-06-20 15:00:22 -04:00
1 parent 4f4e6f2140
commit b5c79bf146
1 file changed
+4 -3
+4 -3
View File
@@ -1736,13 +1736,14 @@ inline bool Server::listen_internal() {
is_running_ = true; is_running_ = true;
for (;;) { for (;;) {
auto val = detail::select_read(svr_sock_, 0, 100000);
if (val == 0) { // Timeout
if (svr_sock_ == INVALID_SOCKET) { if (svr_sock_ == INVALID_SOCKET) {
// The server socket was closed by 'stop' method. // The server socket was closed by 'stop' method.
break; break;
} }
auto val = detail::select_read(svr_sock_, 0, 100000);
if (val == 0) { // Timeout
continue; continue;
} }