[Modify] Replace it
This commit is contained in:
parent
6e0962ce69
commit
5c487003c6
@ -153,9 +153,18 @@ namespace WebSocketSharp
|
|||||||
internal string Reason {
|
internal string Reason {
|
||||||
get {
|
get {
|
||||||
if (!_reasonSet) {
|
if (!_reasonSet) {
|
||||||
_reason = _length > 2
|
if (_length > 2) {
|
||||||
? _data.SubArray (2, _length - 2).UTF8Decode ()
|
var raw = _data.SubArray (2, _length - 2);
|
||||||
: String.Empty;
|
|
||||||
|
string reason;
|
||||||
|
if (!raw.TryGetUTF8DecodedString (out reason))
|
||||||
|
reason = String.Empty;
|
||||||
|
|
||||||
|
_reason = reason;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
_reason = String.Empty;
|
||||||
|
}
|
||||||
|
|
||||||
_reasonSet = true;
|
_reasonSet = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user