ivlovric / HFP

HEP Fidelity Proxy
15 stars 7 forks source link

Flush upon Reconnection #3

Closed Dletta closed 2 years ago

Dletta commented 3 years ago

Hi @ivlovric,

Such a great tool!!

We were testing it today, if you see in the logs we disconnected receiving server and sent hep to the proxy, which worked. Upon reconnect nothing happened, we waited a full minute and then I sent new HEP through the proxy which triggered the flush.

I would have expected the flush to occur as soon as the connection is re-established.

We repeated the test with a longer wait and HEP remains in buffer until new HEP is sent through proxy before the flush.

2021/07/28 11:27:05 -->||Receiving HEP to LOG
2021/07/28 11:27:10 ||-->X Dial OUT reconnect failure - retrying <nil>
2021/07/28 11:27:15 ||-->X Dial OUT reconnect failure - retrying <nil>
2021/07/28 11:27:20 ||-->X Dial OUT reconnect failure - retrying <nil>
2021/07/28 11:27:25 ||-->X Dial OUT reconnect failure - retrying <nil>
2021/07/28 11:27:30 ||-->X Dial OUT reconnect failure - retrying <nil>
2021/07/28 11:27:35 ||-->X Dial OUT reconnect failure - retrying <nil>
2021/07/28 11:27:40 ||-->X Dial OUT reconnect failure - retrying <nil>
2021/07/28 11:27:45 ||-->X Dial OUT reconnect failure - retrying <nil>
2021/07/28 11:27:50 ||-->X Dial OUT reconnect failure - retrying <nil>
2021/07/28 11:27:55 ||-->X Dial OUT reconnect failure - retrying <nil>
2021/07/28 11:28:00 ||-->V Dial OUT reconnected <nil>
2021/07/28 11:28:05 ||-->V Dial OUT reconnected <nil>
2021/07/28 11:29:07 New connection from 127.0.0.1:55523
2021/07/28 11:29:07 ||--> Connected OUT IP.IP.IP.IP:9062 //redacted IP 
2021/07/28 11:29:07 ||-->V Send HEP from LOG OK - 37167 bytes
2021/07/28 11:29:07 Flushing HEP file
2021/07/28 11:29:07 -->||Received:
Dletta commented 3 years ago

We will attempt to fix from our side. You can expect a PR in the next few weeks.

ivlovric commented 3 years ago

Thank you, @Dletta

Yes, I see this also and can confirm. Thank you for reporting and will HEPilly accept any PR. :)

ivlovric commented 2 years ago

Hi Dletta!

Please check latest commit - https://github.com/ivlovric/HFP/commit/fc10002c371f746743fd5ee17592874b64df0ffa

This should be corrected.

Thanks, I