diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-03-14 00:10:40 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2015-03-14 00:10:40 +0900 |
commit | 0076c6d4104c1c03715683b11766c69ebfeaee87 (patch) | |
tree | 71861e7a3f654ef325304bc85c805117738b5932 /tools | |
parent | 35924fdd5c411301d9d0122308e20b138b665aef (diff) |
server: fix handing of a connection closed by peer
When a peer closed a connection (e.g. after we send a notification),
rx goroutine finds it immediately since read() returns an error and
kills tomb. The problem is that tx goroutine doesn't check if tomb
Dying() so tx doesn't die until tx tries to write keepalive to the
socket (and it doesn't never happen if keepalive interval is zero). So
fsm does't become idle shortly.
This fixes tx to check Dying() and makes sure that it sends
notification messages befor dying if they exists.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions