Recently , I found out that while synapse using nio-http protocol to relay the request(received from client) to another axis server, if the network break down, client will never received failure immediatly. It always failed while it's own timeout exceed or synapse's internal timeout exceed;
To avoid this situation, I just temporary correct the ClientHandler.java (checking the axis2request in closed, on-exception event,.., if http request not completed, send a exception response to client ) But I think this is not a good structured solution, And is there any other things could I do to avoid this situation? (etc: could safely called the SessionRequestCallback already exits in class HttpCoreNIOSender)? ==== scenarios: axisClient<-->synapse <--> axisServer 1) axisClient send request to synapse 2) syanpse relay request to axisServer 3) after axisServer received the request, break down the network between synapse and axisServer (etc: shutdown axisServer) 4) axisClient doens't failure immediatly, It's alway's failure when it's timeout exceed; ==== The more details reson I have find out is: When network breakdown(etc axisServer shutdown), org.apache.synapse.transport.nhttp.ClientHandler's corresponding callback handler is invoked (closed(), or exception(),...) . and the callback only just shutdown the connection. But the sessionRequestCallback(HttpCoreNIOSender.sessionRequestCallback) registed when establish http connection(ioreactor.connect(...)) will never be called. so the failure response will not be generated and send back to axisClient.
