Skip to content

Commit 1409b29

Browse files
iProdigytipsy
authored andcommitted
Cache remainingRequests when updating sockets (#67)
* Cache remainingRequests when updating sockets * Naming
1 parent 013de4a commit 1409b29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/kotlin/app/GhService.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import org.eclipse.egit.github.core.service.RepositoryService
77
import org.eclipse.egit.github.core.service.UserService
88
import org.eclipse.egit.github.core.service.WatcherService
99
import org.slf4j.LoggerFactory
10-
import java.io.IOException
1110
import java.util.concurrent.ConcurrentHashMap
1211
import java.util.concurrent.Executors
1312
import java.util.concurrent.TimeUnit
@@ -54,9 +53,10 @@ object GhService {
5453

5554
// update all connected clients with remainingRequests twice per second
5655
scheduleAtFixedRate({
56+
val remainingRequests = remainingRequests.toString()
5757
clientSessions.forEachKey(1) {
5858
try {
59-
it.send(remainingRequests.toString())
59+
it.send(remainingRequests)
6060
} catch (e: Exception) {
6161
log.error(e.toString())
6262
}

0 commit comments

Comments
 (0)