note 123535 added to function.socket-last-error

From: Date: Sat, 19 Jan 2019 20:21:07 +0000
Subject: note 123535 added to function.socket-last-error
Groups: php.notes 
Request: Send a blank email to php-notes+get-210082@lists.php.net to get a copy of this message
note that socket_last_error() cache the last error from the last socket syscall, it does not actually query the OS for the last error on the socket, so if an async socket have an error after the last async operation started successfully, socket_last_error() doesn't know about it, but socket_get_option($sock, SOL_SOCKET, SO_ERROR) actually query the OS, or so it seems... observed on PHP 7.1.16 on Cygwin on win7 x64 SP1 with non-blocking sockets, socket_last_error() never caught on to the fact that the current error had changed from EINPROGRESS (non-blocking connect) to 0 (connection successful) ---- Server IP: 208.43.231.9 Probable Submitter: 185.85.3.142 (proxied: 85.164.47.243) ---- Manual Page -- http://php.net/manual/en/function.socket-last-error.php Edit -- https://master.php.net/note/edit/123535 Del: integrated -- https://master.php.net/note/delete/123535/integrated Del: useless -- https://master.php.net/note/delete/123535/useless Del: bad code -- https://master.php.net/note/delete/123535/bad+code Del: spam -- https://master.php.net/note/delete/123535/spam Del: non-english -- https://master.php.net/note/delete/123535/non-english Del: in docs -- https://master.php.net/note/delete/123535/in+docs Del: other reasons-- https://master.php.net/note/delete/123535 Reject -- https://master.php.net/note/reject/123535 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#210082) next »