reset when we fail in identify
This commit is contained in:
parent
d9712a3b90
commit
2e13245085
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue