eastlund / pmr

Haskell/Java game experiment
0 stars 0 forks source link

Memory leakage #2

Open eastlund opened 10 years ago

eastlund commented 10 years ago

(Could be related to issue #1)

Memory usage seems to be increasing if and only if a player is connected to the server. Could be some oversight in a recursive function or some problem with how we use sockets.

eastlund commented 10 years ago

Problem was caused by not reading from the original broadcast channel. Problem with disconnect still exists, this is likely caused by data being written to the duplicated broadcast channels. Fix TODO. Suggestions?

eastlund commented 10 years ago

Added some Exception handling to sendLoop. If sendLoop can't write to handle then it will switch context to sendLoopDeadLetters that will consume the socketChan-feed. This will cause one active "redundant" thread per disconnected user but I would not expect a performance hit in practice from this.