File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed
CefSharp.BrowserSubprocess.Core Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -56,16 +56,31 @@ namespace CefSharp
5656 {
5757 auto channelFactory = browser->ChannelFactory ;
5858
59- if (channelFactory->State == CommunicationState::Opened)
59+ try
60+ {
61+ if (channelFactory->State == CommunicationState::Opened)
62+ {
63+ channelFactory->Close ();
64+ }
65+ }
66+ catch (Exception^)
6067 {
61- channelFactory->Close ();
68+
69+ channelFactory->Abort ();
6270 }
6371
6472 auto clientChannel = ((IClientChannel^)browser->BrowserProcess );
6573
66- if (clientChannel->State == CommunicationState::Opened)
74+ try
75+ {
76+ if (clientChannel->State == CommunicationState::Opened)
77+ {
78+ clientChannel->Close ();
79+ }
80+ }
81+ catch (Exception^)
6782 {
68- clientChannel->Close ();
83+ clientChannel->Abort ();
6984 }
7085
7186 browser->ChannelFactory = nullptr ;
You can’t perform that action at this time.
0 commit comments