File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -60,17 +60,14 @@ public class CloseEventArgs : EventArgs
6060
6161 internal CloseEventArgs ( )
6262 {
63+ _code = ( ushort ) CloseStatusCode . NoStatus ;
6364 _payloadData = new PayloadData ( ) ;
6465 _rawData = _payloadData . ApplicationData ;
65-
66- _code = ( ushort ) CloseStatusCode . NoStatus ;
67- _reason = String . Empty ;
6866 }
6967
7068 internal CloseEventArgs ( ushort code )
7169 {
7270 _code = code ;
73- _reason = String . Empty ;
7471 _rawData = code . InternalToByteArray ( ByteOrder . Big ) ;
7572 }
7673
@@ -97,7 +94,7 @@ internal CloseEventArgs (PayloadData payloadData)
9794 internal CloseEventArgs ( ushort code , string reason )
9895 {
9996 _code = code ;
100- _reason = reason ?? String . Empty ;
97+ _reason = reason ;
10198 _rawData = code . Append ( reason ) ;
10299 }
103100
@@ -146,7 +143,7 @@ public ushort Code {
146143 /// </value>
147144 public string Reason {
148145 get {
149- return _reason ;
146+ return _reason ?? String . Empty ;
150147 }
151148 }
152149
You can’t perform that action at this time.
0 commit comments