Update sockets_translate.cpp

Add support for the CONNREFUSED Errno.
Without this Connect() will return SUCCESS when a connection is refused, instead of an error code. This causes code, that relies on the result of Connect() being SUCCESS, to execute when it shouldn't.
master
LotP1 2024-01-30 00:23:43 +07:00 committed by GitHub
parent 8ddfecfbae
commit 3acf35bb98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

@ -15,6 +15,8 @@ Errno Translate(Network::Errno value) {
switch (value) {
case Network::Errno::SUCCESS:
return Errno::SUCCESS;
case Network::Errno::CONNREFUSED:
return Errno::CONNREFUSED;
case Network::Errno::BADF:
return Errno::BADF;
case Network::Errno::AGAIN: