| Summary | Setting a time-out on SSL Handshake with Orbix 3 C |
|---|---|
| Article Number | 29039 |
| Environment | Orbix 3 All Supported Platforms |
| Question/Problem Description | How to prevent an Orbix 3 C SSL Handshake from hanging indefinitely by setting a time-out. |
| Clarifying Information | |
| Error Message | |
| Defect/Enhancement Number | Defect ORBTHREE-588 |
| Cause | |
| Resolution | The Orbix C configuration variable IT_READ_TIMEOUT can be used for this purpose. IT_READ_TIMEOUT specifies how much time in seconds a thread is going to wait for data to be received on the socket. When there is no activity on the socket for the time limit set, the reader thread times out and becomes free for processing further events. If a value less than or equal to -1 is passed in, INFINITE_TIMEOUT will be used (This is also the default value). If the value passed in is 0, the read timeout will be 0. This validation is silent and will not raise an exception. This configuration variable can be set by giving the value in seconds in one of the following ways: 1. Programmatically in your client or server code as follows: CORBA::ORB::SetConfigValue("Orbix.IT_READ_TIMEOUT", "5"); 2. In the environment as follows: export IT_READ_TIMEOUT=5 (on Unix) set IT_READ_TIMEOUT=5 (on Windows NT) 3. In the Orbix 3 configuration file as follows: Orbix.IT_READ_TIMEOUT=5; The current value that is used by Orbix can be retrieved using the GetConfigValue routines. For example:CORBA::Long tcp_read_timeout_l; (void)CORBA::ORB::GetConfigValueLong("Orbix.IT_READ_TIMEOUT", tcp_read_timeout_l); char* tcp_read_timeout_s = 0; CORBA::Long tcp_read_timeout_l; (void)CORBA::ORB::GetConfigValue ("Orbix.IT_READ_TIMEOUT", tcp_read_timeout_s); tcp_read_timeout_l = ::atol(tcp_read_timeout_s); |
| Workaround | |
| Notes | Orbix 3.3.9 |
| Attachment |
| Created date: | 22 February 2012 |
|---|---|
| Last Modified: | 14 February 2013 |
| Last Published: | 23 February 2012 |
| First Published date: | 22 February 2012 |
#Orbix
#KnowledgeDocs




