How does WebServiceGatewaySupport control the timeout?

this problem is mainly related to the emergence of a large number of CLOSE_WAIT on the production server. In practice, the third-party interface is sometimes very slow, which is suspected to be related to it. In order to maintain the normal operation of our system, I think we still have to add timeout control in the interface call, using webservice , please tell me how to set it? I looked for the following related classes, but could not find keywords such as timeout , so I asked for help here.

Core class:
org.springframework.ws.client.core.support.WebServiceGatewaySupport

Apr.09,2021

Today's young people are really bad. Whenever there is a problem, bb, doesn't even think about it. The world is getting worse and worse.
is it not good to have a timeout control for your own implementation?
reference for specific implementation:

  1. timeout mechanism
    / first, we implement and execute an anonymous timeout waiting function
    timeout: = make (chan bool, 1)
    go func () {
    time.Sleep (1e9) / / wait 1 second
    timeout <-true
    } ()
    / / then we take advantage of timeout channel
    select {
    case <-ch:
    / / read data from ch
    case <-timeout:
    / / never read data from ch. But read the data from timeout
  2. Context package
    https://www.youtube.com/watch.
Menu