Fix log spamming on premature socket disconnect
authorJeremy Stanley <fungi@yuggoth.org>
Wed, 19 Mar 2014 19:05:57 +0000 (19:05 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Wed, 19 Mar 2014 19:05:57 +0000 (19:05 +0000)
commit0b573f1662c8195b7f1ea6aec911d13d0c35841c
tree584d16a4fd791c861ff52d7d746fb9e709a93acc
parent9b0e63efb9437b770d52a03acc606d0e86273c2a
Fix log spamming on premature socket disconnect

* lib/mudpy/misc.py(User.flush): When sending on a user's socket raises
BrokenPipeError, their connection has probably dropped. Go ahead and set
their state to disconnecting so the socket will be cleaned up earily.
This also stops spamming the log on every failed write to a broken
socket before it eventually times out in the TCP/IP stack as well.
lib/mudpy/misc.py