1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-20 06:45:12 +03:00

fix tcp connect can't set port

This commit is contained in:
cs8425 2017-02-08 23:52:31 +08:00
parent e3cb799898
commit 4b6c0ea423

View file

@ -23,8 +23,8 @@ var serial = {
var testUrl = path.match(/^tcp:\/\/([A-Za-z0-9\.-]+)(?:\:(\d+))?$/)
if (testUrl) {
var ip = testUrl[1];
var port = testUrl[2] || self.connectionPort;
port = parseInt(self.connectionPort);
var port = testUrl[2] || 2323;
port = parseInt(port);
console.log('connect to raw tcp:', ip + ':' + port)
self.connectTcp(ip, port, options, callback);