Skip to content

Commit ff707e0

Browse files
authored
Send integer values properly (#1783)
1 parent 8ac3470 commit ff707e0

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Sources/GRPC/ConnectionPool/ConnectionPool.swift

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@ internal final class ConnectionPool {
351351
logger.trace(
352352
"connection pool has too many waiters",
353353
metadata: [
354-
Metadata.waitersMax: "\(self.maxWaiters)"
354+
Metadata.waitersMax: .stringConvertible(self.maxWaiters)
355355
]
356356
)
357357
promise.fail(GRPCConnectionPoolError.tooManyWaiters(connectionError: self._mostRecentError))
@@ -373,7 +373,7 @@ internal final class ConnectionPool {
373373
"timed out waiting for a connection",
374374
metadata: [
375375
Metadata.waiterID: "\(waiter.id)",
376-
Metadata.waitersCount: "\(self.waiters.count)",
376+
Metadata.waitersCount: .stringConvertible(self.waiters.count),
377377
]
378378
)
379379
}
@@ -384,7 +384,7 @@ internal final class ConnectionPool {
384384
"waiting for a connection to become available",
385385
metadata: [
386386
Metadata.waiterID: "\(waiter.id)",
387-
Metadata.waitersCount: "\(self.waiters.count)",
387+
Metadata.waitersCount: .stringConvertible(self.waiters.count),
388388
]
389389
)
390390

@@ -394,7 +394,7 @@ internal final class ConnectionPool {
394394
self.logger.trace(
395395
"enqueued connection waiter",
396396
metadata: [
397-
Metadata.waitersCount: "\(self.waiters.count)"
397+
Metadata.waitersCount: .stringConvertible(self.waiters.count)
398398
]
399399
)
400400

@@ -445,10 +445,10 @@ internal final class ConnectionPool {
445445
self.logger.debug(
446446
"stream reservation load factor greater than or equal to threshold, bringing up additional connection if available",
447447
metadata: [
448-
Metadata.reservationsCount: "\(demand)",
449-
Metadata.reservationsCapacity: "\(capacity)",
450-
Metadata.reservationsLoad: "\(load)",
451-
Metadata.reservationsLoadThreshold: "\(self.reservationLoadThreshold)",
448+
Metadata.reservationsCount: .stringConvertible(demand),
449+
Metadata.reservationsCapacity: .stringConvertible(capacity),
450+
Metadata.reservationsLoad: .stringConvertible(load),
451+
Metadata.reservationsLoadThreshold: .stringConvertible(self.reservationLoadThreshold),
452452
]
453453
)
454454
}
@@ -783,7 +783,7 @@ extension ConnectionPool {
783783
self.logger.trace(
784784
"servicing waiters",
785785
metadata: [
786-
Metadata.waitersCount: "\(self.waiters.count)"
786+
Metadata.waitersCount: .stringConvertible(self.waiters.count)
787787
]
788788
)
789789

@@ -812,8 +812,8 @@ extension ConnectionPool {
812812
self.logger.trace(
813813
"done servicing waiters",
814814
metadata: [
815-
Metadata.waitersCount: "\(self.waiters.count)",
816-
Metadata.waitersServiced: "\(serviced)",
815+
Metadata.waitersCount: .stringConvertible(self.waiters.count),
816+
Metadata.waitersServiced: .stringConvertible(serviced),
817817
]
818818
)
819819
}

0 commit comments

Comments
 (0)