Removing _frameTask and fixing Task.Run argument
This commit is contained in:
parent
30ec2cb0b1
commit
ff0affe34d
|
|
@ -18,9 +18,8 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
|
||||||
private static long _lastConnectionId;
|
private static long _lastConnectionId;
|
||||||
|
|
||||||
private readonly UvStreamHandle _socket;
|
private readonly UvStreamHandle _socket;
|
||||||
private Frame _frame;
|
private readonly Frame _frame;
|
||||||
private Task _frameTask;
|
private readonly long _connectionId;
|
||||||
private long _connectionId = 0;
|
|
||||||
|
|
||||||
private readonly object _stateLock = new object();
|
private readonly object _stateLock = new object();
|
||||||
private ConnectionState _connectionState;
|
private ConnectionState _connectionState;
|
||||||
|
|
@ -31,16 +30,17 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
|
||||||
ConnectionControl = this;
|
ConnectionControl = this;
|
||||||
|
|
||||||
_connectionId = Interlocked.Increment(ref _lastConnectionId);
|
_connectionId = Interlocked.Increment(ref _lastConnectionId);
|
||||||
|
|
||||||
|
SocketInput = new SocketInput(Memory2);
|
||||||
|
SocketOutput = new SocketOutput(Thread, _socket, _connectionId, Log);
|
||||||
|
_frame = new Frame(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Start()
|
public void Start()
|
||||||
{
|
{
|
||||||
Log.ConnectionStart(_connectionId);
|
Log.ConnectionStart(_connectionId);
|
||||||
|
|
||||||
SocketInput = new SocketInput(Memory2);
|
Task.Run((Action)_frame.ProcessFraming);
|
||||||
SocketOutput = new SocketOutput(Thread, _socket, _connectionId, Log);
|
|
||||||
_frame = new Frame(this);
|
|
||||||
Task.Run(_frame.ProcessFraming);
|
|
||||||
_socket.ReadStart(_allocCallback, _readCallback, this);
|
_socket.ReadStart(_allocCallback, _readCallback, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue