reset when we fail in identify
@@ -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) {
