From 65cb19a726a3d6fbc0f2dce6f39381672d3ea9a1 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 12 Nov 2016 01:40:57 -0500 Subject: [PATCH] remove extension method --- SocketHttpListener.Portable/Ext.cs | 6 ------ .../Net/WebSockets/HttpListenerWebSocketContext.cs | 3 ++- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/SocketHttpListener.Portable/Ext.cs b/SocketHttpListener.Portable/Ext.cs index 303263d0b..87f0887ed 100644 --- a/SocketHttpListener.Portable/Ext.cs +++ b/SocketHttpListener.Portable/Ext.cs @@ -168,12 +168,6 @@ namespace SocketHttpListener : null; } - internal static void Close(this HttpListenerResponse response, HttpStatusCode code) - { - response.StatusCode = (int)code; - response.OutputStream.Dispose(); - } - internal static Stream Compress(this Stream stream, CompressionMethod method) { return method == CompressionMethod.Deflate diff --git a/SocketHttpListener.Portable/Net/WebSockets/HttpListenerWebSocketContext.cs b/SocketHttpListener.Portable/Net/WebSockets/HttpListenerWebSocketContext.cs index 426e15ecd..034ac17d2 100644 --- a/SocketHttpListener.Portable/Net/WebSockets/HttpListenerWebSocketContext.cs +++ b/SocketHttpListener.Portable/Net/WebSockets/HttpListenerWebSocketContext.cs @@ -322,7 +322,8 @@ namespace SocketHttpListener.Net.WebSockets internal void Close(HttpStatusCode code) { - _context.Response.Close(code); + _context.Response.StatusCode = (int)code; + _context.Response.OutputStream.Dispose(); } #endregion