tools/hexnet: doesn’t exit when the connection gets closed by remote peer #65

Open
opened 2022-10-23 00:32:22 +02:00 by BodgeMaster · 3 comments

only applies to TCP mode

The program will just hang there.
I suspect it’s because of the thread that deals with stdin.

only applies to TCP mode The program will just hang there. I suspect it’s because of the thread that deals with stdin.
BodgeMaster added the
Fix Later
Bug
labels 2022-10-23 01:36:43 +02:00
BodgeMaster changed title from tools/hexnet: TCP listen mode doesn’t exit when the connection gets closed to tools/hexnet: doesn’t exit when the connection gets closed by remote peer 2022-10-23 01:52:40 +02:00

Apparently, sockpp sockets aren’t thread safe. This may or may not be the cause of this issue.

Apparently, sockpp sockets aren’t thread safe. This may or may not be the cause of this issue.
BodgeMaster added a new dependency 2022-10-28 01:58:30 +02:00

I’m digging into this now.

Apparently, nobody ever bothered (aka I forgot) to check if the connection was still there before attempting to read from / write to it. Hexnet exits abnormally in this situation because it receives a SIGPIPE.

I’m digging into this now. Apparently, nobody ever bothered (aka I forgot) to check if the connection was still there before attempting to read from / write to it. Hexnet exits abnormally in this situation because it receives a SIGPIPE.

I forgot to write down: Adding a read timeout apparently prevents the thing from running completely. Maybe, this is due to the way the timeout is added?

I forgot to write down: Adding a read timeout apparently prevents the thing from running completely. Maybe, this is due to the way the timeout is added?
Sign in to join this conversation.
There is no content yet.