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) {
79
79
if err != nil {
80
80
fmt .Printf ("ERROR: %s\n " , err )
81
81
}
82
+ fmt .Printf ("handshake completed...disconnecting\n " )
83
+ conn .Close ()
82
84
}
83
85
}
Original file line number Diff line number Diff line change @@ -121,11 +121,16 @@ func (h *Handshake) handleProposeVersions(msgGeneric protocol.Message) error {
121
121
}
122
122
if highestVersion > 0 {
123
123
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
125
130
} else {
126
131
// TODO: handle failures
127
132
// 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" )
129
134
}
130
135
}
131
136
You can’t perform that action at this time.
0 commit comments