Commit 5e68d069 authored by Jeremy Meng's avatar Jeremy Meng

Define PLAT_SAFE_CONTINUATIONS constant. Also fix NETCORE that were missed in previous commit.

parent 9684afb8
......@@ -21,6 +21,7 @@
"frameworks": {
"dnxcore50": {
"compilationOptions": {
"define": [ "PLAT_SAFE_CONTINUATIONS" ],
"warningsAsErrors": false
},
"dependencies": {
......
......@@ -129,7 +129,7 @@ public void Dispose()
if (outStream != null)
{
multiplexer.Trace("Disconnecting...", physicalName);
#if !NETCORE
#if !DNXCORE50
try { outStream.Close(); } catch { }
#endif
try { outStream.Dispose(); } catch { }
......@@ -137,7 +137,7 @@ public void Dispose()
}
if (netStream != null)
{
#if !NETCORE
#if !DNXCORE50
try { netStream.Close(); } catch { }
#endif
try { netStream.Dispose(); } catch { }
......@@ -229,7 +229,7 @@ public void RecordConnectionFailed(ConnectionFailureType failureType, ref Socket
add("Last-Heartbeat", "last-heartbeat", (lastBeat == 0 ? "never" : (unchecked(now - lastBeat)/1000 + "s ago"))+ (bridge.IsBeating ? " (mid-beat)" : "") );
add("Last-Multiplexer-Heartbeat", "last-mbeat", multiplexer.LastHeartbeatSecondsAgo + "s ago");
add("Last-Global-Heartbeat", "global", ConnectionMultiplexer.LastGlobalHeartbeatSecondsAgo + "s ago");
#if !__MonoCS__ && !NETCORE
#if !__MonoCS__ && !DNXCORE50
var mgr = bridge.Multiplexer.SocketManager;
add("SocketManager-State", "mgr", mgr.State.ToString());
add("Last-Error", "err", mgr.LastErrorTimeRelative());
......@@ -757,7 +757,7 @@ SocketMode ISocketCallback.Connected(Stream stream, TextWriter log)
int bufferSize = config.WriteBuffer;
this.netStream = stream;
#if !NETCORE
#if !DNXCORE50
this.outStream = bufferSize <= 0 ? stream : new BufferedStream(stream, bufferSize);
#else
this.outStream = stream;
......
......@@ -16,7 +16,7 @@
"frameworks": {
"dnxcore50": {
"compilationOptions": {
"define": [ "NETCORE" ],
"define": [ "PLAT_SAFE_CONTINUATIONS" ],
"allowUnsafe": true,
"warningsAsErrors": false
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment