fix: set socket to null after close

This commit is contained in:
andrekir
2023-01-10 17:36:46 -03:00
parent 8e2e97b250
commit 7086444917

View File

@@ -50,10 +50,10 @@ class TCPInterface(service: RadioInterfaceService, private val address: String)
val s = socket
if (s != null) {
debug("Closing TCP socket")
socket = null
outStream.close()
inStream.close()
s.close()
socket = null
}
super.onDeviceDisconnect(waitForStopped)
}