mirror of
https://github.com/corda/corda.git
synced 2025-02-21 17:56:54 +00:00
Revert reuseaddr
This commit is contained in:
parent
a4d2b28b6b
commit
9836edd191
@ -181,12 +181,10 @@ private fun getTimestampAsDirectoryName(): String {
|
||||
fun addressMustBeBound(hostAndPort: HostAndPort) {
|
||||
poll("address $hostAndPort to bind") {
|
||||
try {
|
||||
ServerSocket().use {
|
||||
it.bind(InetSocketAddress(hostAndPort.hostText, hostAndPort.port))
|
||||
}
|
||||
null
|
||||
} catch (_exception: SocketException) {
|
||||
Socket(hostAndPort.hostText, hostAndPort.port).close()
|
||||
Unit
|
||||
} catch (_exception: SocketException) {
|
||||
null
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -194,12 +192,10 @@ fun addressMustBeBound(hostAndPort: HostAndPort) {
|
||||
fun addressMustNotBeBound(hostAndPort: HostAndPort) {
|
||||
poll("address $hostAndPort to unbind") {
|
||||
try {
|
||||
ServerSocket().use {
|
||||
it.bind(InetSocketAddress(hostAndPort.hostText, hostAndPort.port))
|
||||
}
|
||||
Unit
|
||||
} catch (_exception: SocketException) {
|
||||
Socket(hostAndPort.hostText, hostAndPort.port).close()
|
||||
null
|
||||
} catch (_exception: SocketException) {
|
||||
Unit
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user