mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 06:15:37 +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