don't return a stateless reset token when adding a new connection ID

Both server and client didn't make use of the token. It was only used by
the connIDGenerator.
This commit is contained in:
Marten Seemann
2020-01-14 17:33:52 +07:00
parent 44c1092ed7
commit 634169b061
9 changed files with 51 additions and 44 deletions

View File

@@ -95,11 +95,10 @@ func (h *packetHandlerMap) logUsage() {
}
}
func (h *packetHandlerMap) Add(id protocol.ConnectionID, handler packetHandler) [16]byte {
func (h *packetHandlerMap) Add(id protocol.ConnectionID, handler packetHandler) {
h.mutex.Lock()
h.handlers[string(id)] = handler
h.mutex.Unlock()
return h.GetStatelessResetToken(id)
}
func (h *packetHandlerMap) AddIfNotTaken(id protocol.ConnectionID, handler packetHandler) bool /* was added */ {