jgauffin / Griffin.WebServer

A web server built on top of Griffin.Framework
107 stars 42 forks source link

Semaphore exception when serving partical large files #34

Closed mayuri10000 closed 6 years ago

mayuri10000 commented 7 years ago

when I was tried to request for a large .mp4 file from my server, the exception occurred. I visited the url from localhost with Google Chrome, which can play .mp4 files directiy. But if I drug the progress bar for over 5 times, the server application crashed. My code: ModuleManager mmgr=new ModuleManager(); Griffin.WebServer.Files.DiskFileService fserv=new Griffin.WebServer.Files.DiskFileService("/","E:\\www"); Griffin.WebServer.Files.MimeTypeProvider.Instance.Add("mp4","video/mp4"); Griffin.WebServer.Files.FileModule fmodule=new Griffin.WebServer.Files.FileModule(fserv); mmgr.Add(fmodule); HttpServer server=new HttpServer(mmgr); // TODO: Implement Functionality Here server.Start(IPAddress.Parse("127.0.0.1"),8000); screenshot of the exception: image

jgauffin commented 6 years ago

I've written a few more socket implementations after the one in Griffin Framework. With the new async/aways structure it's much easier to write robust async code. However, it would require some effort and it's nothing I currently have time to do.