src/java.net.http/share/classes/jdk/internal/net/http/websocket/WebSocketImpl.java
equal
deleted
inserted
replaced
290 // output in place. Otherwise the number of Close messages in queue |
290 // output in place. Otherwise the number of Close messages in queue |
291 // would not be bounded. |
291 // would not be bounded. |
292 if (!isLegalToSendFromClient(statusCode)) { |
292 if (!isLegalToSendFromClient(statusCode)) { |
293 result = failedFuture(new IllegalArgumentException("statusCode")); |
293 result = failedFuture(new IllegalArgumentException("statusCode")); |
294 } else if (!isLegalReason(reason)) { |
294 } else if (!isLegalReason(reason)) { |
295 result = failedFuture(new IOException("reason")); |
295 result = failedFuture(new IllegalArgumentException("reason")); |
296 } else if (!outputClosed.compareAndSet(false, true)){ |
296 } else if (!outputClosed.compareAndSet(false, true)){ |
297 result = failedFuture(new IOException("Output closed")); |
297 result = failedFuture(new IOException("Output closed")); |
298 } else { |
298 } else { |
299 result = sendClose0(statusCode, reason); |
299 result = sendClose0(statusCode, reason); |
300 } |
300 } |