Bug 53828 - StreamInbound.closeOutboundConnection(WsFrame) closes with an opcode instead of status
StreamInbound.closeOutboundConnection(WsFrame) closes with an opcode instead ...
Status: RESOLVED FIXED
Product: Tomcat 7
Classification: Unclassified
Component: Catalina
trunk
All All
: P2 minor (vote)
: ---
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2012-09-04 16:55 UTC by Michael Newcomb
Modified: 2012-09-04 20:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Newcomb 2012-09-04 16:55:42 UTC
201	private void closeOutboundConnection(WsFrame frame) throws IOException {
202	  try {
203	    getWsOutbound().close(frame);
204	  } finally {
205	    doOnClose(Constants.OPCODE_CLOSE);
206	  }
207	}

Line 205 uses the close opcode instead of a valid status (Constants.STATUS_*).

Not sure of the exact context of this called but it seems to only be called when the last frame from the client was a close frame, thus a Constants.STATUS_NORMAL may be in order.

If not, the frame's opcode could be inspected and mapped to an appropriate status (normal, shutdown, etc...).

Thanks,
Michael
Comment 1 Mark Thomas 2012-09-04 20:05:48 UTC
Thanks for the report. Fixed in trunk and 7.0.x and will be included in 7.0.31 onwards.