Here's what I think is happening.
kplex has a not-quite-conventional approach to its data flow in that it doesn't use select(), poll() or similar but uses a separate thread for every input and every output.
Read interfaces sit in a blocking read. If the other end of a tcp socket closes the connection the read will return an error, kplex knows the connection is closed and will terminate the interface. If the interface is bi-directional it will also terminate its "pair" in the write thread.
But this is an output-only interface. What seems to be happening here is that because no data is being sent to kplex, it's not writing to any of its open sockets. Because it doesn't write to anything, it doesn't get an error to tell it the socket it is writing to is closed and so doesn't know to terminate the thread and close the socket.
if I'm right, removing "direction=out" would make the socket bi-drectional and cause the read thread to terminate the connection when the client shut down.
Undesirable behaviour for sure but this isn't so much a bug as a condition which wasn't anticipated (no outputs to write and repeated reconnections)
kplex has a not-quite-conventional approach to its data flow in that it doesn't use select(), poll() or similar but uses a separate thread for every input and every output.
Read interfaces sit in a blocking read. If the other end of a tcp socket closes the connection the read will return an error, kplex knows the connection is closed and will terminate the interface. If the interface is bi-directional it will also terminate its "pair" in the write thread.
But this is an output-only interface. What seems to be happening here is that because no data is being sent to kplex, it's not writing to any of its open sockets. Because it doesn't write to anything, it doesn't get an error to tell it the socket it is writing to is closed and so doesn't know to terminate the thread and close the socket.
if I'm right, removing "direction=out" would make the socket bi-drectional and cause the read thread to terminate the connection when the client shut down.
Undesirable behaviour for sure but this isn't so much a bug as a condition which wasn't anticipated (no outputs to write and repeated reconnections)