You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by Влад Мілютін <vl...@gmail.com> on 2020/10/01 09:20:10 UTC

PlcConnection isConnected returns true

Hello guys,

I'm writing to you with the hope that you can help me to understand one
issue. I've created a connection to the device, I've turned off my network,
so I don't have any connection to the device, but if I'll try to get
connection status, it will be connected but in reality it is not. How I can
avoid this issue or do a reconnect feature?

Kind regards,
Vlad

Re: PlcConnection isConnected returns true

Posted by Christofer Dutz <ch...@c-ware.de>.
This is another reason I would really like to get rid of netty ... it's no longer doing very much in our drivers (is more a relic from the pre 0.7-times).
I think as soon as I have the SPI working for Go we could think of back porting that structure to Java and to eliminate Netty all together.

Chris


Am 14.10.20, 18:21 schrieb "Łukasz Dywicki" <lu...@code-house.org>:

    It might be that we miss netty level event or error which is related to
    it.. so exception in writing does not cause connection to be marked as
    invalid. I've noticed couple of exceptions which reached end of pipeline
    so we definitely can improve that part in near future.

    Best,
    Łukasz

    On 01.10.2020 13:23, Влад Мілютін wrote:
    > Hi Christofer,
    > 
    > Yes, network is down but isConnected returns true
    > I hope you can see my screen.
    > 
    > Kind regards,
    > Vlad


Re: PlcConnection isConnected returns true

Posted by Łukasz Dywicki <lu...@code-house.org>.
It might be that we miss netty level event or error which is related to
it.. so exception in writing does not cause connection to be marked as
invalid. I've noticed couple of exceptions which reached end of pipeline
so we definitely can improve that part in near future.

Best,
Łukasz

On 01.10.2020 13:23, Влад Мілютін wrote:
> Hi Christofer,
> 
> Yes, network is down but isConnected returns true
> I hope you can see my screen.
> 
> Kind regards,
> Vlad

Re: PlcConnection isConnected returns true

Posted by Влад Мілютін <vl...@gmail.com>.
Hi Christofer,

Yes, network is down but isConnected returns true
I hope you can see my screen.

Kind regards,
Vlad

Re: PlcConnection isConnected returns true

Posted by Christofer Dutz <ch...@c-ware.de>.
Hi Vlad,

well I just had a look ... we're relying on some netty functionality ... perhaps we should investigate your case.
So you establish a connection and then "pull the plug" ... after that it still says "connected" ... correct?

Chris



Am 01.10.20, 13:05 schrieb "Влад Мілютін" <vl...@gmail.com>:

    Hello guys,

    I'm writing to you with the hope that you can help me to understand one
    issue. I've created a connection to the device, I've turned off my network,
    so I don't have any connection to the device, but if I'll try to get
    connection status, it will be connected but in reality it is not. How I can
    avoid this issue or do a reconnect feature?

    Kind regards,
    Vlad