la5nta / wl2k-go

A Winlink framework for Go.
https://getpat.io
MIT License
50 stars 20 forks source link

transport/ax25: libax25 socket is not properly closed (on failure?) #5

Closed martinhpedersen closed 8 years ago

martinhpedersen commented 9 years ago

--------- some log output ------

2015/03/10 17:42:17 Connecting to ax25:LA1B-10... 2015/03/10 17:42:59 Connected to AX.25:LA1B-10 2015/03/10 17:42:59 Exchange failed: EOF 2015/03/10 17:43:17 Connecting to ax25:LA1B-10... 2015/03/10 17:43:17 Unable to establish connection to remote: Unable to connect: address already in use 2015/03/10 17:43:21 Connecting to ax25:LA1B-10... 2015/03/10 17:43:21 Unable to establish connection to remote: Unable to connect: address already in use 2015/03/10 17:43:28 Connecting to ax25:LA1B-10... 2015/03/10 17:44:00 Connected to AX.25:LA1B-10 2015/03/10 17:44:00 Exchange failed: EOF 2015/03/10 17:45:00 Connecting to ax25:LA1B-10... 2015/03/10 17:45:02 Connected to AX.25:LA1B-10 [WL2K-2.8.5529.14476-B2FWIHJM$] Brentwood CMS via LA1B >

FF FQ Waiting for remote node to close the connection... 2015/03/10 17:45:25 Disconnected. 2015/03/10 17:45:32 Connecting to ax25:LA1B-10... 2015/03/10 17:45:32 Unable to establish connection to remote: Unable to connect: address already in use 2015/03/10 17:45:35 Connecting to ax25:LA1B-10... 2015/03/10 17:45:35 Unable to establish connection to remote: Unable to connect: address already in use 2015/03/10 17:45:43 Connecting to ax25:LA1B-10... 2015/03/10 17:45:44 Connected to AX.25:LA1B-10 [WL2K-2.8.5529.14476-B2FWIHJM$] Wien CMS via LA1B > FF FQ Waiting for remote node to close the connection... 2015/03/10 17:46:07 Disconnected.

martinhpedersen commented 9 years ago

Maybe it's a timing issue? Currently, on timeout, we close the fd. What if the kernel keeps trying to connect after we have timed out?

martinhpedersen commented 8 years ago

Could it be that the kernel is waiting for an acknowledgement of the DISC packet before releasing the address?