What can cause WAIT-FOR READ-RESPONSE to throw error 4123?

Posted by jquerijero on 20-Dec-2019 16:14

From time to time, error 4123 when WAIT-FOR READ-RESPONSE on a socket is initiated. Any idea on what can cause this? It doesn't happen all the time.

None of the widgets used in the WAIT-FOR statement are in a state (such as SENSITIVE) such that the specified event can occur. WAIT-FOR terminated. (4123)

All Replies

Posted by frank.meulblok on 20-Dec-2019 16:25

That'll happen if the socket is not currently listening on an open connection, ie. CONNECTED() returns FALSE.

Or in the unlikely event that the handle you specify in the WAIT-FOR isn't pointing to a socket object.

Posted by jquerijero on 20-Dec-2019 16:31

There is a check for CONNECTED() before WAIT-FOR, and it should initiate a reconnect if it is not connected. By the way, shouldn't the call to WRITE() trigger an error first if it is caused by closed connection.

Posted by frank.meulblok on 20-Dec-2019 16:54

> it should initiate a reconnect if it is not connected.

At the risk of asking the obvious: Do you double-check if the reconnect was successful ?

>  shouldn't the call to WRITE() trigger an error first if it is caused by closed connection.

Possibly. But that depends on the order in which the statements execute, and how the other end of the connection behaves.

Posted by frank.meulblok on 20-Dec-2019 16:54

> it should initiate a reconnect if it is not connected.

At the risk of asking the obvious: Do you double-check if the reconnect was successful ?

>  shouldn't the call to WRITE() trigger an error first if it is caused by closed connection.

Possibly. But that depends on the order in which the statements execute, and how the other end of the connection behaves.

Posted by jquerijero on 20-Dec-2019 18:52

There is a check for CONNECTED() again.

This thread is closed