Skip to content


Remove async connect flag #32

merged 1 commit into from

4 participants


The case isn't handled by the rest of the code. If the connect doesn't happen
right away then subsequent (and too quick) fgets() gets FALSE and everything fails.


And why is there non-blocking "support" at all? When one enables non-blocking
those fgets() won't cut it. I would suggest removing the support from code
altogether, currently it just gives false impression on available functionality.

Swift Mailer member

I have started an async branch, just need time to implement it as you need a state tracker :)


Nevertheless current code is broken, please merge the connect flag removal.


@fabpot, ping

Can this be merged as this currently is broken on Windows 7?

@fabpot fabpot merged commit 172b799 into swiftmailer:4.1
@swiftmailer swiftmailer referenced this pull request

Add STARTTLS support #52

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 10, 2011
  1. Remove async connect flag

    lenar committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/classes/Swift/Transport/StreamBuffer.php
2 lib/classes/Swift/Transport/StreamBuffer.php
@@ -268,7 +268,7 @@ private function _establishSocketConnection()
- if (!$this->_stream = stream_socket_client($host.':'.$this->_params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_ASYNC_CONNECT|STREAM_CLIENT_CONNECT, stream_context_create($options)))
+ if (!$this->_stream = stream_socket_client($host.':'.$this->_params['port'], $errno, $errstr, $timeout, STREAM_CLIENT_CONNECT, stream_context_create($options)))
throw new Swift_TransportException(
'Connection could not be established with host ' . $this->_params['host'] .
Something went wrong with that request. Please try again.