File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -79,5 +79,7 @@ func testServer(f *globalFlags) {
7979 if err != nil {
8080 fmt .Printf ("ERROR: %s\n " , err )
8181 }
82+ fmt .Printf ("handshake completed...disconnecting\n " )
83+ conn .Close ()
8284 }
8385}
Original file line number Diff line number Diff line change @@ -121,11 +121,16 @@ func (h *Handshake) handleProposeVersions(msgGeneric protocol.Message) error {
121121 }
122122 if highestVersion > 0 {
123123 resp := NewMsgAcceptVersion (highestVersion , versionData )
124- return h .proto .SendMessage (resp , true )
124+ if err := h .proto .SendMessage (resp , true ); err != nil {
125+ return err
126+ }
127+ h .Version = highestVersion
128+ h .Finished <- true
129+ return nil
125130 } else {
126131 // TODO: handle failures
127132 // https://github.com/cloudstruct/go-ouroboros-network/issues/32
128- return nil
133+ return fmt . Errorf ( "handshake failed, but we don't yet support this" )
129134 }
130135}
131136
You can’t perform that action at this time.
0 commit comments