Skip to content

Commit

Permalink
Fix WinSock error 10047 when connecting to localhost broker
Browse files Browse the repository at this point in the history
  • Loading branch information
davidepianca98 committed Feb 23, 2024
1 parent 91d5d0d commit 02683d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kmqtt-common/src/mingwX64Main/kotlin/Posix.kt
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public actual fun MemScope.set_socket_timeout(__fd: Int, timeout: Long): Int {
public actual fun MemScope.getaddrinfo(name: String, service: String?): CPointer<sockaddr>? {
val hints = alloc<addrinfo>()
platform.posix.memset(hints.ptr, 0, sizeOf<addrinfo>().convert())
hints.ai_family = platform.posix.AF_UNSPEC
hints.ai_family = platform.posix.AF_INET
hints.ai_socktype = platform.posix.SOCK_STREAM
hints.ai_protocol = platform.posix.IPPROTO_TCP
val result = alloc<CPointerVar<addrinfo>>()
Expand Down

0 comments on commit 02683d6

Please sign in to comment.