217 Http2TestServerConnection c = |
217 Http2TestServerConnection c = |
218 new Http2TestServerConnection(this, socket, exchangeSupplier); |
218 new Http2TestServerConnection(this, socket, exchangeSupplier); |
219 connections.put(addr, c); |
219 connections.put(addr, c); |
220 try { |
220 try { |
221 c.run(); |
221 c.run(); |
222 } catch(Throwable e) { |
222 } catch (Throwable e) { |
223 // we should not reach here, but if we do |
223 // we should not reach here, but if we do |
224 // the connection might not have been closed |
224 // the connection might not have been closed |
225 // and if so then the client might wait |
225 // and if so then the client might wait |
226 // forever. |
226 // forever. |
227 connections.remove(addr, c); |
227 connections.remove(addr, c); |
228 c.close(ErrorFrame.PROTOCOL_ERROR); |
228 c.close(ErrorFrame.PROTOCOL_ERROR); |
229 throw e; |
229 System.err.println("TestServer: start exception: " + e); |
|
230 //throw e; |
230 } |
231 } |
231 } |
232 } |
232 } catch (Throwable e) { |
233 } catch (Throwable e) { |
233 if (!stopping) { |
234 if (!stopping) { |
234 System.err.println("TestServer: start exception: " + e); |
235 System.err.println("TestServer: terminating, caught " + e); |
235 e.printStackTrace(); |
236 e.printStackTrace(); |
236 } |
237 } |
237 } |
238 } |
238 }); |
239 }); |
239 } |
240 } |