mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-23 18:15:24 +00:00
attempting to debug/fix a possible goroutine leak
This commit is contained in:
parent
ea58a0f181
commit
df1239b054
@ -460,9 +460,6 @@ func (intf *link) notifyStalled() {
|
|||||||
// reset the close timer
|
// reset the close timer
|
||||||
func (intf *link) notifyReading() {
|
func (intf *link) notifyReading() {
|
||||||
intf.Act(&intf.reader, func() {
|
intf.Act(&intf.reader, func() {
|
||||||
if intf.closeTimer != nil {
|
|
||||||
intf.closeTimer.Stop()
|
|
||||||
}
|
|
||||||
intf.closeTimer = time.AfterFunc(closeTime, func() { intf.msgIO.close() })
|
intf.closeTimer = time.AfterFunc(closeTime, func() { intf.msgIO.close() })
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -470,6 +467,7 @@ func (intf *link) notifyReading() {
|
|||||||
// wake up the link if it was stalled, and (if size > 0) prepare to send keep-alive traffic
|
// wake up the link if it was stalled, and (if size > 0) prepare to send keep-alive traffic
|
||||||
func (intf *link) notifyRead(size int) {
|
func (intf *link) notifyRead(size int) {
|
||||||
intf.Act(&intf.reader, func() {
|
intf.Act(&intf.reader, func() {
|
||||||
|
intf.closeTimer.Stop()
|
||||||
if intf.stallTimer != nil {
|
if intf.stallTimer != nil {
|
||||||
intf.stallTimer.Stop()
|
intf.stallTimer.Stop()
|
||||||
intf.stallTimer = nil
|
intf.stallTimer = nil
|
||||||
|
Loading…
Reference in New Issue
Block a user