Open chenderong opened 5 years ago
pipeline.AddLast("BDClientHandler", new BDDataClientHandler()); PlatSendMessageToTerProcessing Task.Factory.StartNew _pmqMRE.WaitOne();
dotnetty stop WaitOne why?
use Task.Run replace Task.Factory.StartNew
it is ok
`()
.Option(ChannelOption.TcpNodelay, true)
.Handler(new ActionChannelInitializer(channel =>
{
IChannelPipeline pipeline = channel.Pipeline;
pipeline.AddLast(new NLogHandler("BDDataClientService"));
pipeline.AddLast("IdleStateHandler", new IdleStateHandler(300, 60, 300));
pipeline.AddLast("DBTerIdelStateMyHandler", new DBDataIdelStateMyHandler());
pipeline.AddLast("BeiDouFrameDecoder", new BeiDouFrameDecoder(BDFrameConst.FRAME_FLAG, BDFrameConst.FRAME_MAX_LEN, BDFrameConst.FRAME_Min_LEN));
pipeline.AddLast("BDClientBeiDouContentDecoderHandler", new BeiDouContentDecoderHandler(this._optionsMonitor));
pipeline.AddLast("BeiDouContentEncoderHandler", new BeiDouContentEncoderHandler());
pipeline.AddLast("BDClientHandler", new BDDataClientHandler());
}));
var bootstrap = new Bootstrap(); bootstrap .Group(group) .Channel
BDDataClientHandler:
}
PlatSendMessageToTerProcessing
private ManualResetEvent _pmqMRE = new ManualResetEvent(false);
`
_pmqMRE.WaitOne(); I dot not user Dotnetty thread,dotnetty stop there why? thanks a lot