You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to suggest a small modification. It does appear that in some cases kirc gets stuck while trying to connect to a remote host that may have strong firewall policies. I can think of this example:
./kirc -s www.google.com -n test
Kirc will be hanged and will wait for remote host response for a very long period of time. I recommend the following solutions (requires including <sys/time.h>):
I apologize for the updates that have been far and few in between. After having spent a little time looking over this issue, I have come to the conclusion to not use setsockopt() due to portability concerns. In fact, implementing this solution makes no difference in my development environment (e.g. the timeout is ~3sec regardless of the setting for timeout.tv_usec). The most robust solution I can think of would be to (1) create the socket connection (2) set the fd to non-blocking mode and (3) use poll() to check this status of the fd and see if some predetermined timeout condition is met.
More to come in the next week or two... I figured I owed some explanation for the delay. =S
Dear Kirc Staff:
I would like to suggest a small modification. It does appear that in some cases kirc gets stuck while trying to connect to a remote host that may have strong firewall policies. I can think of this example:
Kirc will be hanged and will wait for remote host response for a very long period of time. I recommend the following solutions (requires including <sys/time.h>):
Adding in line 669:
where a timeout of 3 seconds is set, and then adding the following to line 680:
This will cause Kirc to exit and display an error message as a connecting timeout of 3 seconds is reached.
I'm open to feedback or ideas, and certainly discuss further if this is not a proper solution.
The text was updated successfully, but these errors were encountered: