mirror of
https://github.com/php/php-src.git
synced 2025-01-22 11:44:09 +08:00
- Removed duplicate error + reset error in new sockets
This commit is contained in:
parent
3ab88a4718
commit
a66b053ac9
@ -663,6 +663,8 @@ PHP_FUNCTION(socket_create_listen)
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
php_sock->error = 0;
|
||||
|
||||
ZEND_REGISTER_RESOURCE(return_value, php_sock, le_socket);
|
||||
}
|
||||
/* }}} */
|
||||
@ -681,9 +683,10 @@ PHP_FUNCTION(socket_accept)
|
||||
ZEND_FETCH_RESOURCE(php_sock, php_socket *, &arg1, -1, le_socket_name, le_socket);
|
||||
|
||||
if (!php_accept_connect(php_sock, &new_sock, (struct sockaddr *) &sa TSRMLS_CC)) {
|
||||
PHP_SOCKET_ERROR(new_sock, "unable to accept socket connection", errno);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
new_sock->error = 0;
|
||||
|
||||
ZEND_REGISTER_RESOURCE(return_value, new_sock, le_socket);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user