reset when we fail in identify

This commit is contained in:
Steven Allen 2018-08-08 11:48:45 -07:00
parent d9712a3b90
commit 2e13245085
1 changed files with 2 additions and 2 deletions

View File

@ -92,13 +92,13 @@ func (ids *IDService) IdentifyConn(c inet.Conn) {
c.Close()
return
}
defer inet.FullClose(s)
s.SetProtocol(ID)
// ok give the response to our handler.
if err := msmux.SelectProtoOrFail(ID, s); err != nil {
log.Event(context.TODO(), "IdentifyOpenFailed", c.RemotePeer(), logging.Metadata{"error": err})
s.Reset()
return
}
@ -111,8 +111,8 @@ func (ids *IDService) IdentifyConn(c inet.Conn) {
if !found {
log.Errorf("IdentifyConn failed to find channel (programmer error) for %s", c)
return
}
inet.FullClose(s)
}
func (ids *IDService) requestHandler(s inet.Stream) {