mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-09-08 11:25:25 -04:00
fix: set socket to null after close
This commit is contained in:
1 parent
8e2e97b250
commit
7086444917
1 file changed
+1
-1
@@ -50,10 +50,10 @@ class TCPInterface(service: RadioInterfaceService, private val address: String)
|
|||||||
val s = socket
|
val s = socket
|
||||||
if (s != null) {
|
if (s != null) {
|
||||||
debug("Closing TCP socket")
|
debug("Closing TCP socket")
|
||||||
socket = null
|
|
||||||
outStream.close()
|
outStream.close()
|
||||||
inStream.close()
|
inStream.close()
|
||||||
s.close()
|
s.close()
|
||||||
|
socket = null
|
||||||
}
|
}
|
||||||
super.onDeviceDisconnect(waitForStopped)
|
super.onDeviceDisconnect(waitForStopped)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user