Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Commit

Permalink
[refer #380] Set lastMessage when connection is created
Browse files Browse the repository at this point in the history
  • Loading branch information
knizhnik committed Oct 30, 2020
1 parent 75f2805 commit 78e3ef2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/resources/reference.conf
Expand Up @@ -144,7 +144,7 @@ scorex {
# Synchronization status update interval for stable regime
syncStatusRefreshStable = 4m

# Dropping dead connections timeout
# Timeout for dropping dead connections
inactiveConnectionDeadline = 12m

# Network controller timeout
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/scorex/core/network/NetworkController.scala
Expand Up @@ -312,7 +312,7 @@ class NetworkController(settings: NetworkSettings,

val handler = context.actorOf(handlerProps) // launch connection handler
context.watch(handler)
val connectedPeer = ConnectedPeer(connectionId, handler, 0, None)
val connectedPeer = ConnectedPeer(connectionId, handler, networkTime(), None)
connections += connectionId.remoteAddress -> connectedPeer
unconfirmedConnections -= connectionId.remoteAddress
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/scorex/core/network/peer/PeerInfo.scala
Expand Up @@ -9,7 +9,7 @@ import scorex.core.network.{ConnectionDirection, PeerSpec}
* Information about peer to be stored in PeerDatabase
*
* @param peerSpec - general information about the peer
* @param lastHandshake - timestamp when this peer was last seen in the network
* @param lastHandshake - timestamp when last handshake was done
* @param connectionType - type of connection (Incoming/Outgoing) established to this peer if any
*/
case class PeerInfo(peerSpec: PeerSpec,
Expand Down

0 comments on commit 78e3ef2

Please sign in to comment.