Skip to content

Commit 4ad6a02

Browse files
committed
Fix potential NRE
1 parent 20b0c40 commit 4ad6a02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/NetMQ/Core/Utils/StringLib.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public static string AsString(this Socket socket)
110110
{
111111
sb.Append("IsBound,");
112112
}
113-
if (socket.LingerState.Enabled)
113+
if (socket.LingerState?.Enabled == true)
114114
{
115115
sb.Append("LingerTime=");
116116
sb.Append(socket.LingerState.LingerTime);

0 commit comments

Comments
 (0)