Added version to user agent info, and other minor fixes
This commit is contained in:
@ -41,7 +41,7 @@ class NetworkConnectionInitializer(
|
||||
|
||||
fun start() {
|
||||
if (mode == Connection.Mode.CLIENT || mode == Connection.Mode.SYNC) {
|
||||
send(Version(nonce = ctx.clientNonce, addrFrom = NetworkAddress.ANY, addrRecv = node))
|
||||
send(Version(nonce = ctx.clientNonce, addrFrom = NetworkAddress.ANY, addrRecv = node, userAgent = ctx.userAgent))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -408,18 +408,18 @@ class NioNetworkHandler : NetworkHandler, InternalContext.ContextHolder {
|
||||
val incomingConnections = TreeMap<Long, Int>()
|
||||
val outgoingConnections = TreeMap<Long, Int>()
|
||||
|
||||
for (connection in connections.keys) {
|
||||
if (connection.state == Connection.State.ACTIVE) {
|
||||
for (stream in connection.streams) {
|
||||
connections.keys
|
||||
.filter { it.state == Connection.State.ACTIVE }
|
||||
.forEach {
|
||||
for (stream in it.streams) {
|
||||
streams.add(stream)
|
||||
if (connection.mode == SERVER) {
|
||||
if (it.mode == SERVER) {
|
||||
DebugUtils.inc(incomingConnections, stream)
|
||||
} else {
|
||||
DebugUtils.inc(outgoingConnections, stream)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
val streamProperties = mutableListOf<Property>()
|
||||
for (stream in streams) {
|
||||
val incoming = incomingConnections[stream] ?: 0
|
||||
|
Reference in New Issue
Block a user