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 @@ ...@@ -21,6 +21,7 @@
"frameworks": { "frameworks": {
"dnxcore50": { "dnxcore50": {
"compilationOptions": { "compilationOptions": {
"define": [ "PLAT_SAFE_CONTINUATIONS" ],
"warningsAsErrors": false "warningsAsErrors": false
}, },
"dependencies": { "dependencies": {
......
...@@ -129,7 +129,7 @@ public void Dispose() ...@@ -129,7 +129,7 @@ public void Dispose()
if (outStream != null) if (outStream != null)
{ {
multiplexer.Trace("Disconnecting...", physicalName); multiplexer.Trace("Disconnecting...", physicalName);
#if !NETCORE #if !DNXCORE50
try { outStream.Close(); } catch { } try { outStream.Close(); } catch { }
#endif #endif
try { outStream.Dispose(); } catch { } try { outStream.Dispose(); } catch { }
...@@ -137,7 +137,7 @@ public void Dispose() ...@@ -137,7 +137,7 @@ public void Dispose()
} }
if (netStream != null) if (netStream != null)
{ {
#if !NETCORE #if !DNXCORE50
try { netStream.Close(); } catch { } try { netStream.Close(); } catch { }
#endif #endif
try { netStream.Dispose(); } catch { } try { netStream.Dispose(); } catch { }
...@@ -229,7 +229,7 @@ public void RecordConnectionFailed(ConnectionFailureType failureType, ref Socket ...@@ -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-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-Multiplexer-Heartbeat", "last-mbeat", multiplexer.LastHeartbeatSecondsAgo + "s ago");
add("Last-Global-Heartbeat", "global", ConnectionMultiplexer.LastGlobalHeartbeatSecondsAgo + "s ago"); add("Last-Global-Heartbeat", "global", ConnectionMultiplexer.LastGlobalHeartbeatSecondsAgo + "s ago");
#if !__MonoCS__ && !NETCORE #if !__MonoCS__ && !DNXCORE50
var mgr = bridge.Multiplexer.SocketManager; var mgr = bridge.Multiplexer.SocketManager;
add("SocketManager-State", "mgr", mgr.State.ToString()); add("SocketManager-State", "mgr", mgr.State.ToString());
add("Last-Error", "err", mgr.LastErrorTimeRelative()); add("Last-Error", "err", mgr.LastErrorTimeRelative());
...@@ -757,7 +757,7 @@ SocketMode ISocketCallback.Connected(Stream stream, TextWriter log) ...@@ -757,7 +757,7 @@ SocketMode ISocketCallback.Connected(Stream stream, TextWriter log)
int bufferSize = config.WriteBuffer; int bufferSize = config.WriteBuffer;
this.netStream = stream; this.netStream = stream;
#if !NETCORE #if !DNXCORE50
this.outStream = bufferSize <= 0 ? stream : new BufferedStream(stream, bufferSize); this.outStream = bufferSize <= 0 ? stream : new BufferedStream(stream, bufferSize);
#else #else
this.outStream = stream; this.outStream = stream;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
"frameworks": { "frameworks": {
"dnxcore50": { "dnxcore50": {
"compilationOptions": { "compilationOptions": {
"define": [ "NETCORE" ], "define": [ "PLAT_SAFE_CONTINUATIONS" ],
"allowUnsafe": true, "allowUnsafe": true,
"warningsAsErrors": false "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