Skip to content

Commit 7e360f6

Browse files
adamcarhedenMarkusBordihn
authored andcommitted
Fixed window failing to close on Linux (#147)
* Fixed window failing to close on Linux
1 parent 9a7e8f2 commit 7e360f6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/ui/menubar/menubar.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,15 @@ cwc.ui.Menubar.prototype.closeWindow = function() {
320320
this.log_.info('Close Coding with Chrome editor ...');
321321
let bluetoothInstance = this.helper.getInstance('bluetooth');
322322
if (bluetoothInstance) {
323-
bluetoothInstance.closeSockets();
323+
let featuresInstance = this.helper.getInstance('features');
324+
if (featuresInstance) {
325+
if (featuresInstance.getChromeFeature('bluetoothSocket')) {
326+
bluetoothInstance.closeSockets();
327+
}
328+
} else {
329+
this.log_.warn('Failed to get Features helper.'+
330+
'Can\'t check if bluetoothSocket is supported');
331+
}
324332
}
325333
this.currentWindow['close']();
326334
};

0 commit comments

Comments
 (0)