NativeFd: fix CHECKs

GitOrigin-RevId: bbbbad169513c4503eba1c7a98349c98b9e6ed1a
This commit is contained in:
Arseny Smirnov 2019-08-28 16:59:50 +03:00
parent 787e370002
commit 2b382567be

View File

@ -26,7 +26,9 @@ namespace td {
class FdSet { class FdSet {
public: public:
void on_create_fd(NativeFd::Fd fd) { void on_create_fd(NativeFd::Fd fd) {
CHECK(is_valid(fd)); if (!is_valid(fd)) {
return;
}
if (is_stdio(fd)) { if (is_stdio(fd)) {
return; return;
} }
@ -52,7 +54,9 @@ class FdSet {
} }
void on_close_fd(NativeFd::Fd fd) { void on_close_fd(NativeFd::Fd fd) {
CHECK(is_valid(fd)); if (!is_valid(fd)) {
return;
}
if (is_stdio(fd)) { if (is_stdio(fd)) {
return; return;
} }