mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
make new kotlin version happy — cleanup code
This commit is contained in:
@@ -117,12 +117,11 @@ private fun doConnect(bootstrap: Bootstrap,
|
||||
|
||||
bootstrap.validate()
|
||||
|
||||
val socket: Socket
|
||||
while (true) {
|
||||
try {
|
||||
//noinspection IOResourceOpenedButNotSafelyClosed,SocketOpenedButNotSafelyClosed
|
||||
socket = Socket(remoteAddress.address, remoteAddress.port)
|
||||
break
|
||||
val channel = OioSocketChannel(Socket(remoteAddress.address, remoteAddress.port))
|
||||
BootstrapUtil.initAndRegister(channel, bootstrap).sync()
|
||||
return channel
|
||||
}
|
||||
catch (e: IOException) {
|
||||
if (stopCondition.value(null) || promise != null && promise.state != Promise.State.PENDING) {
|
||||
@@ -144,12 +143,7 @@ private fun doConnect(bootstrap: Bootstrap,
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
val channel = OioSocketChannel(socket)
|
||||
BootstrapUtil.initAndRegister(channel, bootstrap).sync()
|
||||
return channel
|
||||
}
|
||||
|
||||
private fun connectNio(bootstrap: Bootstrap,
|
||||
|
||||
Reference in New Issue
Block a user