Skip to content

Commit 58d68c6

Browse files
committed
Revert "THRIFT-1482 Allow unix domain sockets in TSocket"
This reverts commit 0481fcd.
1 parent 1834bfc commit 58d68c6

File tree

2 files changed

+1
-28
lines changed

2 files changed

+1
-28
lines changed

lib/php/lib/Transport/TSocket.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ public function open()
218218
throw new TTransportException('Cannot open null host', TTransportException::NOT_OPEN);
219219
}
220220

221-
if ($this->port_ <= 0 && strpos($this->host_, 'unix://') !== 0) {
221+
if ($this->port_ <= 0) {
222222
throw new TTransportException('Cannot open without port', TTransportException::NOT_OPEN);
223223
}
224224

lib/php/test/Unit/Lib/Transport/TSocketTest.php

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -246,33 +246,6 @@ public function testOpenPersist()
246246
$this->assertTrue($transport->isOpen());
247247
}
248248

249-
public function testOpenUnixSocket()
250-
{
251-
$host = 'unix:///tmp/ipc.sock';
252-
$port = -1;
253-
$persist = false;
254-
$debugHandler = null;
255-
256-
$this->getFunctionMock('Thrift\Transport', 'fsockopen')
257-
->expects($this->once())
258-
->with(
259-
$host,
260-
$port,
261-
$this->anything(), #$errno,
262-
$this->anything(), #$errstr,
263-
$this->anything() #$this->sendTimeoutSec_ + ($this->sendTimeoutUsec_ / 1000000),
264-
);
265-
266-
$transport = new TSocket(
267-
$host,
268-
$port,
269-
$persist,
270-
$debugHandler
271-
);
272-
273-
$transport->open();
274-
}
275-
276249
/**
277250
* @dataProvider open_THRIFT_5132_DataProvider
278251
*/

0 commit comments

Comments
 (0)