Update bad transaction ID handling for response

Receiving the messages with transaction ID that is currently not in
progress is expected.

* Change output format to hexademical to improve readability
* Change log severity to warning
* Update wording (invalid -> unknown)

Relates to #59
This commit is contained in:
Aleksandr Razumov
2019-06-04 08:40:40 -07:00
committed by Sean DuBois
parent 165d04e58f
commit 3183920f01
+2 -2
View File
@@ -142,7 +142,7 @@ func (s *controllingSelector) HandleBindingRequest(m *stun.Message, local, remot
func (s *controllingSelector) HandleSucessResponse(m *stun.Message, local, remote Candidate, remoteAddr net.Addr) {
ok, pendingRequest := s.agent.handleInboundBindingSuccess(m.TransactionID)
if !ok {
s.log.Errorf("discard message from (%s), invalid TransactionID %s", remote, m.TransactionID)
s.log.Warnf("discard message from (%s), unknown TransactionID 0x%x", remote, m.TransactionID)
return
}
@@ -234,7 +234,7 @@ func (s *controlledSelector) HandleSucessResponse(m *stun.Message, local, remote
ok, pendingRequest := s.agent.handleInboundBindingSuccess(m.TransactionID)
if !ok {
s.log.Errorf("discard message from (%s), invalid TransactionID %s", remote, m.TransactionID)
s.log.Warnf("discard message from (%s), unknown TransactionID 0x%x", remote, m.TransactionID)
return
}