Player quit command crashes trogdor-server
crankycyclops opened this issue · 1 comments
crankycyclops commented
Client side:
COMMAND james
GET
quit
Connection closed by foreign host.
Server side:
Segmentation fault (core dumped)
Hmmm...
crankycyclops commented
This was because if I'd executed a quit command, the player was removed from the game (deleted), afterwhich I was attempting to access its members to reset its input and output streams. You can guess what happened after.
Solution was to check if the player still exists before resetting its stream objects.