Skip to content

Commit 86ebec4

Browse files
committed
minor fix for 2392776
1 parent 812d6e4 commit 86ebec4

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/org/java_websocket/WebSocket.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,20 @@ public enum Role {
9696
/**
9797
* Used in {@link WebSocketServer} and {@link WebSocketClient}.
9898
*
99-
* @param socketChannel
99+
* @param socketchannel
100100
* The <tt>SocketChannel</tt> instance to read and
101101
* write to. The channel should already be registered
102102
* with a Selector before construction of this object.
103103
* @param listener
104104
* The {@link WebSocketListener} to notify of events when
105105
* they occur.
106106
*/
107-
public WebSocket( WebSocketListener listener , Draft draft , SocketChannel socketChannel ) {
108-
init( listener, draft, socketChannel );
107+
public WebSocket( WebSocketListener listener , Draft draft , SocketChannel socketchannel ) {
108+
init( listener, draft, socketchannel );
109109
}
110110

111-
public WebSocket( WebSocketListener listener , List<Draft> drafts , SocketChannel socketChannel ) {
112-
init( listener, null, sockchannel );
111+
public WebSocket( WebSocketListener listener , List<Draft> drafts , SocketChannel socketchannel ) {
112+
init( listener, null, socketchannel );
113113
this.role = Role.SERVER;
114114
if( known_drafts == null || known_drafts.isEmpty() ) {
115115
known_drafts = new ArrayList<Draft>( 1 );
@@ -122,8 +122,8 @@ public WebSocket( WebSocketListener listener , List<Draft> drafts , SocketChanne
122122
}
123123
}
124124

125-
private void init( WebSocketListener listener, Draft draft, SocketChannel sockchannel ) {
126-
this.sockchannel = sockchannel;
125+
private void init( WebSocketListener listener, Draft draft, SocketChannel socketchannel ) {
126+
this.sockchannel = socketchannel;
127127
this.bufferQueue = new LinkedBlockingQueue<ByteBuffer>( 10 );
128128
this.socketBuffer = ByteBuffer.allocate( 65558 );
129129
socketBuffer.flip();

src/org/java_websocket/WebSocketServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public void run() {
184184
if( key.isAcceptable() ) {
185185
SocketChannel client = server.accept();
186186
client.configureBlocking( false );
187-
WebSocket c = new WebSocket( this, Collections.singletonList( draft ), client.socket().getChannel() );
187+
WebSocket c = new WebSocket( this, Collections.singletonList( draft ), client );
188188
client.register( selector, SelectionKey.OP_READ, c );
189189
}
190190

0 commit comments

Comments
 (0)