Skip to content

Commit 522f442

Browse files
committed
Merge branch 'nm/fix-mailbox-leak'
2 parents 9a87a31 + 7d0a199 commit 522f442

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/peer.tcl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ proc ::peer {process {dieOnDisconnect false}} {
3636
}
3737
proc clear {} {
3838
variable process
39-
Mailbox::clear $process $::thisProcess
39+
variable connected
40+
set connected false
41+
Mailbox::clear $process $::thisProcess
42+
Mailbox::clear $::thisProcess $process
4043
}
4144

4245
proc share {shareStatements} {

main.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,7 @@ namespace eval ::Mailbox {
597597
}
598598
$cc proc clear {char* from char* to} void {
599599
mailbox_t* mailbox = find(from, to);
600+
fprintf(stderr, "Mailbox clear %s -> %s\n", from, to);
600601
pthread_mutex_lock(&mailbox->mutex); {
601602
mailbox->active = 0;
602603
mailbox->mail[0] = '\0';

0 commit comments

Comments
 (0)