Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Remove async connect flag #32

Merged
merged 1 commit into from

4 participants

@lenar

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.

@lenar

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.

@xdecock
Collaborator

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

@lenar

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

@schmittjoh

@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
Closed

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 authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/classes/Swift/Transport/StreamBuffer.php
View
2  lib/classes/Swift/Transport/StreamBuffer.php
@@ -268,7 +268,7 @@ private function _establishSocketConnection()
{
$options['socket']['bindto']=$this->_params['sourceIp'].':0';
}
- 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.