Noahs-ARK / semafor

http://www.ark.cs.cmu.edu/SEMAFOR
GNU General Public License v3.0
95 stars 47 forks source link

Return error message in socket server when parseSentence throws an error #7

Closed vanatteveldt closed 10 years ago

vanatteveldt commented 10 years ago

Currently, the socketserver simply does not respond if parseSentence throws an error, causing netcat / the client to hang.

Proposed change returns a simple {"error": } json to signal that there is a problem.

vanatteveldt commented 10 years ago

By the way, any word on #5 ? It occurs quite frequently, I am guessing 1 in 20 sentences or so, so it would be great if it could be fixed

vanatteveldt commented 10 years ago

(the second commit isn't strictly necessary, but it makes it a bit more legible and made it easier to add an interactive mode)