NanoHttpd / nanohttpd

Tiny, easily embeddable HTTP server in Java.
http://nanohttpd.org
BSD 3-Clause "New" or "Revised" License
6.96k stars 1.7k forks source link

How to restart nanohttpd server after an exception in side. #472

Open sakkeerhussain opened 6 years ago

sakkeerhussain commented 6 years ago

Issue in one request fails my server and unable to serve continuously. Is there an option to restart server after a crash inside?

LordFokas commented 6 years ago

This needs to be looked at. With proper exception handling your server never really stops though.

sakkeerhussain commented 6 years ago

@LordFokas I am able to handle all exception inside with a try catch. But in case of client disconnected and time out exceptions (Socket write exception), how can we(users of nanohttpd server) catch exceptions?

LordFokas commented 6 years ago

Oh that was something that was kind of half assed in v2 but I think it has been fixed, at least as of the code in v3. Will add to the milestone just foor the sake of double checking :)

sakkeerhussain commented 6 years ago

@LordFokas I am using version 2.3.1 and having that issue. Any update available for that version?

LordFokas commented 6 years ago

not really, no. V3 is badly stuck as of now, and I'm too busy trying to get my personal life rolling to get it going for the time being :/