mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-24 13:55:36 +03:00
Fix socket_open when the connect fails, -1 is not set after closing sockfd
This commit is contained in:
parent
27f451a868
commit
a10fdfa6a1
@ -142,7 +142,10 @@ static cell AMX_NATIVE_CALL socket_open(AMX *amx, cell *params)
|
||||
if(nonblocking_socket && (errno == EINPROGRESS || errno == EWOULDBLOCK))
|
||||
connect_inprogress = true;
|
||||
else
|
||||
{
|
||||
close(sockfd);
|
||||
sockfd = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user