Skip to content

Commit 5d5781b

Browse files
committed
update code
1 parent 8b59f93 commit 5d5781b

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/System.Private.ServiceModel/tests/Scenarios/Extensibility/WebSockets/WebSocketTests.4.1.0.cs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -471,12 +471,12 @@ public static void WebSocket_Http_RequestReply_Streamed(NetHttpMessageEncoding m
471471
}
472472

473473
// *** CLEANUP *** \\
474-
// Close the client and channel factory if not running on localhost. CoreWCF has a bug in Close method with Streamed transfer mode.
474+
// Close the client and channel factory if not running on localhost. CoreWCF has a bug in Close method.
475475
if (!ScenarioTestHelpers.IsLocalHost())
476476
{
477477
((ICommunicationObject)client).Close();
478478
channelFactory.Close();
479-
}
479+
}
480480
}
481481
finally
482482
{
@@ -529,9 +529,9 @@ public static void WebSocket_Http_RequestReply_Buffered(NetHttpMessageEncoding m
529529
}
530530

531531
// *** CLEANUP *** \\
532-
((ICommunicationObject)client).Close();
533-
channelFactory.Close();
534-
}
532+
((ICommunicationObject)client).Close();
533+
channelFactory.Close();
534+
}
535535
finally
536536
{
537537
// *** ENSURE CLEANUP *** \\
@@ -583,8 +583,12 @@ public static void WebSocket_Http_RequestReply_Buffered_KeepAlive(NetHttpMessage
583583
}
584584

585585
// *** CLEANUP *** \\
586-
((ICommunicationObject)client).Close();
587-
channelFactory.Close();
586+
// Close the client and channel factory if not running on localhost. CoreWCF has a bug in Close method.
587+
if (!ScenarioTestHelpers.IsLocalHost())
588+
{
589+
((ICommunicationObject)client).Close();
590+
channelFactory.Close();
591+
}
588592
}
589593
finally
590594
{

0 commit comments

Comments
 (0)