From ced42779be738ea38d2882635c17412278d4b74f Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Sat, 27 May 2023 21:36:46 +0300 Subject: [PATCH] Fix UDP connection --- .../jvmMain/kotlin/space/kscience/controls/ports/ChannelPort.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controls-core/src/jvmMain/kotlin/space/kscience/controls/ports/ChannelPort.kt b/controls-core/src/jvmMain/kotlin/space/kscience/controls/ports/ChannelPort.kt index 0a9a0f0..d0b9e1f 100644 --- a/controls-core/src/jvmMain/kotlin/space/kscience/controls/ports/ChannelPort.kt +++ b/controls-core/src/jvmMain/kotlin/space/kscience/controls/ports/ChannelPort.kt @@ -114,7 +114,7 @@ public object UdpPort : PortFactory { coroutineContext: CoroutineContext = context.coroutineContext, ): ChannelPort = ChannelPort(context,coroutineContext){ DatagramChannel.open().apply { - bind(InetSocketAddress(host, port)) + connect(InetSocketAddress(host, port)) configureBlocking(false) } }