Skip to content

Commit 83f23d6

Browse files
authored
Merge pull request #141 from sudevva/master
Fix: unix AsyncTcpConnection error
2 parents a4f2899 + 0e9decf commit 83f23d6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Connection/AsyncTcpConnection.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,10 @@ public function __construct($remote_address, $context_option = null)
106106
{
107107
$address_info = parse_url($remote_address);
108108
if (!$address_info) {
109-
echo new \Exception('bad remote_address');
110-
$this->_remoteAddress = $remote_address;
109+
list($scheme, $this->_remoteAddress) = explode(':', $remote_address, 2);
110+
if (!$this->_remoteAddress) {
111+
echo new \Exception('bad remote_address');
112+
}
111113
} else {
112114
if (!isset($address_info['port'])) {
113115
$address_info['port'] = 80;

0 commit comments

Comments
 (0)