Open pulquero opened 3 years ago
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
Hi sorry for late answer. The reason why I didn't merged this change, is because I'm not sure about it. I think it's better to find out the reason why createLogFile() func sometimes return null and try to fix that. Because otherwise user would think the log is being record, while in reality it isn't
Forgot to mention, it returned null because I didn't config a log file name.
Aha! So that's what my problem is. I could not figure out why when I click connect and select the device, nothing would happen and I had to "Clear Data" on android to get it to work again. If I turn on logging, it goes through connecting... and connects. If I have logging off, then it just goes right back to being disconnected immediately.
So the logging is really mandatory currently, since you can't connect if there is no log file.
If createLogFile() returns null, then the 'let' clause is never executed making it impossible to connect. Instead of returning null, return an outputstream that just discards everything.