mkjeff / secs4net

SECS-II/HSMS-SS/GEM implementation on .NET
https://mkjeff.github.io/secs4net/
MIT License
443 stars 195 forks source link

EQ cannot be connected after reopen host severial times while selected #94

Closed brucetju closed 10 months ago

brucetju commented 10 months ago

Describe the bug EQ cannot be connected after reopen host severial times while selected. Not every time, sometimes happens.

To Reproduce Steps to reproduce the behavior:

  1. open two secsDevice(net461 also showed in following picture), one is set as eq while another is set as host.
  2. enable eq
  3. enable host, two side will be both in selected mode after a while
  4. close host app(not Disable host). Normally eq side will be set in Connecting status as following: 图片

but sometimes eq side will stay in Retry status showing exception message "Unhandled exception occurred on PipeDecoder producer, 指定的参数已超出有效值的范围" as following: 图片

Once switched into Retry status, even disable and enable eq again, host cann't connect to eq side. and when click on disable button, error message pop out as following: 图片

Expected behavior Except eq side can be connected in all condition at any time.

Desktop (please complete the following information):

mkjeff commented 10 months ago

I can't reproduce on net472 while using the same code base version.

I'm curious why your TFM is net461. SecsDevice project can't be built if TFM changes to net461.

maybe you can take a look at this.

brucetju commented 10 months ago

Yeah... sorry for my mistake, net461 is built previously. Currently, secs4net v2.3.2.0 with LinkTestInterval enabled solved my connection failure issue! Thank you very much!