Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into win32-stack
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardnormier committed Nov 11, 2024
2 parents f61fd80 + 46f2de5 commit 26f8a84
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
5 changes: 4 additions & 1 deletion cpp/test/Ice/binding/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ class Client : public Test::TestHelper
void
Client::run(int argc, char** argv)
{
Ice::CommunicatorHolder communicator = initialize(argc, argv);
Ice::PropertiesPtr properties = createTestProperties(argc, argv);
// Speed-up connection establishment failure on Windows.
properties->setProperty("Ice.Connection.Client.ConnectTimeout", "1");
Ice::CommunicatorHolder communicator = initialize(argc, argv, properties);
void allTests(Test::TestHelper*);
allTests(this);
}
Expand Down
9 changes: 2 additions & 7 deletions js/src/Ice/OutgoingConnectionFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,8 @@ export class OutgoingConnectionFactory {
this._connectionOptions,
);
} catch (ex) {
if (ex instanceof LocalException) {
try {
transceiver.close();
} catch (exc) {
// Ignore
}
}
Debug.assert(ex instanceof LocalException);
transceiver.close();
throw ex;
}

Expand Down
3 changes: 2 additions & 1 deletion js/src/Ice/TcpTransceiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ if (typeof net.createConnection === "function") {

close() {
if (this._fd === null) {
Debug.assert(this._exception); // Socket creation failed.
// Socket creation failed or not yet initialized, the later can happen if the connection creation throws
// before calling transceiver initialize.
return;
}

Expand Down
4 changes: 2 additions & 2 deletions js/src/Ice/WSTransceiver.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ if (typeof WebSocket !== "undefined") {

close() {
if (this._fd === null) {
Debug.assert(this._exception); // Websocket creation failed.
// Socket creation failed or not yet initialized, the later can happen if the connection creation throws
// before calling transceiver initialize.
return;
}

Expand All @@ -122,7 +123,6 @@ if (typeof WebSocket !== "undefined") {
return;
}

Debug.assert(this._fd !== null);
try {
this._state = StateClosed;
this._fd.close();
Expand Down
5 changes: 4 additions & 1 deletion php/test/Ice/slicing/objects/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,10 @@ function allTests($helper)
$d1->pb = null;
$d1->pd1 = null;
$b1->pb = null;
$p1->pd1 = null;
if($p1 instanceof Test\D3)
{
$p1->pd3 = null;
}
}
echo "ok\n";

Expand Down

0 comments on commit 26f8a84

Please sign in to comment.