mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 11:41:48 +00:00
Added initiator field to peer to detect in the peer initiated the connected.
This commit is contained in:
parent
95a7ac1d22
commit
058459c65d
3 changed files with 12 additions and 10 deletions
|
@ -125,7 +125,7 @@ func (s *Server) loop() {
|
|||
s.logger.Printf("peer registered from address %s", peer.conn.RemoteAddr())
|
||||
|
||||
// only respond with the version mesage if the peer initiated the connection.
|
||||
if peer.initiater {
|
||||
if peer.initiator {
|
||||
resp, err := s.handlePeerConnected()
|
||||
if err != nil {
|
||||
s.logger.Fatalf("handling initial peer connection failed: %s", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue