mirror of
https://github.com/thegecko/web-bluetooth-dfu.git
synced 2025-12-10 10:58:24 +08:00
Merge pull request #20 from mjdietzx/patch-1
Make gattServer a global variable to fix https://github.com/thegecko/…
This commit is contained in:
4
dist/dfu.js
vendored
4
dist/dfu.js
vendored
@@ -43,6 +43,8 @@
|
||||
}
|
||||
}(this, function(Promise, bluetooth, crc16) {
|
||||
"use strict";
|
||||
|
||||
var server; // Make server a global variable (initialized in connect(). This fixes a bug in BlueZ that causes transfers to stall.
|
||||
|
||||
var LITTLE_ENDIAN = true;
|
||||
|
||||
@@ -209,7 +211,7 @@
|
||||
|
||||
function connect(device) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
var server = null;
|
||||
//var server = null;
|
||||
var service = null;
|
||||
var controlChar = null;
|
||||
var packetChar = null;
|
||||
|
||||
Reference in New Issue
Block a user