Skip to content

samples/02_InventoryStream throws java.net.SocketException: Socket closed #7

@baba012

Description

@baba012

Hello,
I'm testing with a Sampo S1 (usb + ethernet) connected with the ethernet cable directly to my mac.
If I run ./run_sample.sh samples/02_InventoryStream/, when the connection with the reader is closed I see the following exception
java.net.SocketException: Socket closed at java.base/sun.nio.ch.NioSocketImpl.ensureOpenAndConnected(NioSocketImpl.java:165) at java.base/sun.nio.ch.NioSocketImpl.beginWrite(NioSocketImpl.java:366) at java.base/sun.nio.ch.NioSocketImpl.implWrite(NioSocketImpl.java:411) at java.base/sun.nio.ch.NioSocketImpl.write(NioSocketImpl.java:440) at java.base/sun.nio.ch.NioSocketImpl$2.write(NioSocketImpl.java:826) at java.base/java.net.Socket$SocketOutputStream.write(Socket.java:1035) at com.nordicid.nurapi.NurApiSocketTransport.writeData(NurApiSocketTransport.java:206) at com.nordicid.nurapi.NurPacket.write(NurPacket.java:161) at com.nordicid.nurapi.NurApi.writeThread(NurApi.java:3099) at com.nordicid.nurapi.NurApi.access$1100(NurApi.java:29) at com.nordicid.nurapi.NurApi$9.run(NurApi.java:3060) at java.base/java.lang.Thread.run(Thread.java:833)
followed by this line
Log[2]: 1680650742807 exchangeCommand() 14; write failure

Trying to debug I can avoid the exception working on the writeData() method of the NurApiSocketTransport, but I still see the line "Log[2] ....".
What is the reason of this line?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions