donpdonp/Java-WebSocket — comment on commit 16242e9f44f761f873fd66e7e2a323e1ff0e8330
File:  line 0
By donpdonp:

since conn = new Websocket was happening as the last statement and the exception throwing was happening before then, the conn.close()s can be factored out by putting the new Websocket after the try {}