a:errorcode: fix code of StaleNonce

This commit is contained in:
Aleksandr Razumov
2018-08-15 00:51:34 +03:00
parent b917e50d12
commit ff1597ccdf
3 changed files with 3 additions and 3 deletions

View File

@@ -70,7 +70,7 @@ pkg github.com/gortc/stun, const CodeRoleConflict = 478
pkg github.com/gortc/stun, const CodeRoleConflict ErrorCode
pkg github.com/gortc/stun, const CodeServerError = 500
pkg github.com/gortc/stun, const CodeServerError ErrorCode
pkg github.com/gortc/stun, const CodeStaleNonce = 428
pkg github.com/gortc/stun, const CodeStaleNonce = 438
pkg github.com/gortc/stun, const CodeStaleNonce ErrorCode
pkg github.com/gortc/stun, const CodeTryAlternate = 300
pkg github.com/gortc/stun, const CodeTryAlternate ErrorCode

View File

@@ -92,7 +92,7 @@ const (
CodeBadRequest ErrorCode = 400
CodeUnauthorised ErrorCode = 401
CodeUnknownAttribute ErrorCode = 420
CodeStaleNonce ErrorCode = 428
CodeStaleNonce ErrorCode = 438
CodeRoleConflict ErrorCode = 478
CodeServerError ErrorCode = 500
)

View File

@@ -59,7 +59,7 @@ func TestMessage_AddErrorCode(t *testing.T) {
t.Error(err)
}
copy(m.TransactionID[:], transactionID)
expectedCode := ErrorCode(428)
expectedCode := ErrorCode(438)
expectedReason := "Stale Nonce"
CodeStaleNonce.AddTo(m)
m.WriteHeader()