MehrabRahman / JavaServer

0 stars 1 forks source link

Potential issues #4

Open runo313 opened 1 month ago

runo313 commented 1 month ago

The handle method creates requests and response objects for clients, but the socket remains open and never closed. This could to a resource leak. Also, I noticed the server handles each request one at a time which is unrealistic in real-world applications such as a school server where multiple students are trying to access information during finals.

Aradhya1612 commented 1 month ago

You Can use the 'Try-catch-finally' block. Inside Finally block put server close function.