Why does my application appear to hang for several minutes when I disconnect the network cable?

Why does my application appear to hang for several minutes when I disconnect the network cable?

book

Article ID: KB0087083

calendar_today

Updated On:

Products Versions
TIBCO SmartSockets -
Not Applicable -

Description

Resolution:
When a NIC cable is disconnected the tcp timeout parameters may kick in. These timeout values are greater than SmartSockets application read_timeout and keep_alive timeout values. If the socket is still "lingering", control does not pass to the application until the tcp timeout parameters exhaust themselves. This gives the impression that the application is hung.  

Solution: Add the following undocumented options in your rtserver.cm files as well as in the client's .cm file.
setopt _socket_linger FALSE
setopt _socket_linger_time 0.0

Issue/Introduction

Why does my application appear to hang for several minutes when I disconnect the network cable?