-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 To whom it may concern,
On 6/29/17 1:49 PM, V User wrote: > Yes, although I admit I'm just learning about all the implications > of that. It seemed to me that even if the actual transmission/write > blocks indefinitely, that should be happening "asynchronously" in > another thread or something and shouldn't stop the Async version of > sendText from returning since it's supposed to return "before the > message is transmitted". It looks like I was wrong there though, so > I'll have to look in to change the connector type. When the BIO connector is in use, you end up with weird things like this. I would switch to BIO if you want to use async. Any reason not to upgrade to Tomcat 8.0/8.5? Many improvements... - -chris > On Thu, Jun 29, 2017 at 1:39 PM, Christopher Schultz < > ch...@christopherschultz.net> wrote: > > Z, V, etc., > > On 6/29/17 1:16 PM, V User wrote: >>>> Hello! I have a question about the RemoteEndpoint.Async >>>> sendText method. The spec states: "Initiates the asynchronous >>>> transmission of a text message. This method returns before >>>> the message is transmitted." To me, this implies that the >>>> method should return immediately regardless of network status >>>> (i.e. it should still return immediately even if the socket >>>> connection has died without closing), but I've observed it >>>> blocking on writes to a broken connection. >>>> >>>> I'm also dealing with a known issue with timeouts on Tomcat 7 >>>> with a BIO connector >>>> (https://bz.apache.org/bugzilla/show_bug.cgi?id=56304). >>>> Looking at the source, the Basic/blocking sendText method >>>> calls sendPartialString, which uses a Future in the same way >>>> that the Async sendText method does, and then calls get on >>>> that Future with the configured timeout, so I'd imagine that >>>> if the Basic/blocking method has broken timeouts then the >>>> Async timeouts will be broken as well. >>>> >>>> Am I mis-interpreting the spec by expecting Async sendText >>>> to return immediately if the socket connection is broken? Is >>>> this just an extension of the issue with BIO connectors? >>>> >>>> My version information is: Server version: Apache >>>> Tomcat/7.0.64 Server built: Aug 19 2015 17:18:06 UTC Server >>>> number: 7.0.64.0 OS Name: Linux OS Version: >>>> 3.13.0-57-generic Architecture: amd64 JVM Version: >>>> 1.8.0_131-b11 JVM Vendor: Oracle Corporation >>>> >>>> Thanks, Z > > Are you in fact using a BIO connector? Because you can't really > expect non-blocking semantics with an underlying pro-blocking > connector. > > -chris >> >> --------------------------------------------------------------------- >> >> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org >> For additional commands, e-mail: users-h...@tomcat.apache.org >> >> > -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJZVWoNAAoJEBzwKT+lPKRYQrEP/0pmfxg7sjspLNnbvDxTc3Hj oCmMjiUyUfyWbQfsh1kHh85CJYoZMgsrTl14jOzmwJFDg3wM1vTJHK99W5F6i9qY 3iRfZPAlRTiR19MqkJv5LL2y/QDg2ccIraJgOiXQ+fIKWQUx23cbEzCdbISwFL/p Gjz5GHc3cpyIHSit9/Hxx8eLUND7P0T57zKpYwyRUVMs6eC0Y67L35tr0DNTUBTv nHrkZ+mBaiTv7kdeDisc7gQjXganP/WuTkjVWP3XTR1JHEDHRiqRykq5pj/K+Nc8 oyK4LBIcmaN/paHKe9o8zlG+iu2koul9fDX5DxuUJSlnxfg0pOaLxDeC/YzFQrWM WPVivhtVhB/fVgoT3IFj4jDoYOHMNepBSEek3ACxi92W+b3bM34YRWo5lKunZqo4 xlCeVaOpXYYfZUQPs7Hxv6p7HPTp+uIAXoVcFX8zCyW30v/bjRJU92RIjcsnDOZE f6Y/RUMB5xejz6A4pwueuLFlSM1Op6FtkyB8HgeS+xNE8xEiVY4RpOfZTbckJ6UL QGsDn1w8hZDqBtHWqpLtYujltP1mZn3FtM1DpUxFZuOu74WJs3pmL14AmbvEtyEm ASoWyQ73l8fmzPwZc9suHY8PRqVZ0/q1QzGX9DFC/im8/5mpDfQC5rZbmLp50ic7 hKP7sfB5KRGvaHmpLjcn =8q1M -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org