Skip to content

Commit

Permalink
delta reversed
Browse files Browse the repository at this point in the history
  • Loading branch information
kushti committed Oct 20, 2023
1 parent 2ddc123 commit df6626c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/scala/scorex/core/network/NetworkController.scala
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ class NetworkController(ergoSettings: ErgoSettings,
val lastSeen = peerInfo.lastStoredActivityTime
val timeout = networkSettings.inactiveConnectionDeadline.toMillis
val delta = now - lastSeen
if (now - lastSeen > timeout && lastSeen > 0) {
if (delta > timeout && lastSeen > 0) {
log.info(s"Dropping connection with ${peerInfo}, last seen ${delta / 1000.0} seconds ago")
cp.handlerRef ! CloseConnection
}
Expand Down

0 comments on commit df6626c

Please sign in to comment.