Skip to content

Commit

Permalink
Fix NumberFormatException in socket path to hex
Browse files Browse the repository at this point in the history
  • Loading branch information
DevNatan committed Feb 4, 2024
1 parent dde750a commit e0bd1da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commonMain/kotlin/me/devnatan/yoki/io/Http.kt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private fun createUrlBuilder(socketPath: String): URLBuilder = if (isUnixSocket(
URLBuilder(
protocol = URLProtocol.HTTP,
port = DOCKER_SOCKET_PORT,
host = socketPath.substringAfter(UNIX_SOCKET_PREFIX).toInt().toHexString() + ENCODED_HOSTNAME_SUFFIX,
host = socketPath.substringAfter(UNIX_SOCKET_PREFIX).encodeToByteArray().toHexString() + ENCODED_HOSTNAME_SUFFIX,
)
} else {
val url = Url(socketPath)
Expand Down

0 comments on commit e0bd1da

Please sign in to comment.