Reconnect the reused packetIO when deploying (#637)

This commit is contained in:
Guillaume Jenkins 2018-02-07 15:55:50 -05:00 committed by GitHub
parent 801563a66c
commit 98acbc34f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,8 +83,16 @@ namespace pxt.editor {
packetIoPromise = null;
return Promise.reject(err);
});
return packetIoPromise;
} else {
let packetIo: pxt.HF2.PacketIO;
return packetIoPromise
.then((io) => {
packetIo = io;
return io.reconnectAsync();
})
.then(() => packetIo);
}
return packetIoPromise;
}
let previousDapWrapper: DAPWrapper;