Commit c2c379da authored by Mygod's avatar Mygod

Handle closed local sockets

parent 24510cc2
...@@ -65,7 +65,7 @@ abstract class LocalSocketListener(name: String, socketFile: File) : Thread(name ...@@ -65,7 +65,7 @@ abstract class LocalSocketListener(name: String, socketFile: File) : Thread(name
open fun shutdown(scope: CoroutineScope) { open fun shutdown(scope: CoroutineScope) {
running = false running = false
localSocket.fileDescriptor.apply { localSocket.fileDescriptor?.apply {
// see also: https://issuetracker.google.com/issues/36945762#comment15 // see also: https://issuetracker.google.com/issues/36945762#comment15
if (valid()) try { if (valid()) try {
Os.shutdown(this, OsConstants.SHUT_RDWR) Os.shutdown(this, OsConstants.SHUT_RDWR)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment