node not being freed at times - how to force queue_free() or emit a signal only once and then never again?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By aleks

In this part of the script, I want to kill the node after the user drags a picture left or right (will become swiping a card on mobile) and emit a signal that tells another parent node what direction was the drag towards.
After the queue free, the same node is re-instanced with updated properties (following card appears).
This works most of the times, but sometimes if the “swiping” is too fast, the current node stays while the new one is reinstanced.
I suppose because queue_free waits for the node to be idle, and if the user keeps clicking it doesn’t get idle fast enough to be terminated. Any thoughts how to fix it?

Here is the code:

func _input(event):
	# Detect mouse motion when clicked
	if event is InputEventMouseMotion and event.button_mask&1 :
		var rel_x = event.relative.x
		# if card in the center, add drag card along with mouse motion
		if $BGContainer/BGImage.position.x > (center_position.x-card_slide_from_side) and $BGContainer/BGImage.position.x < (center_position.x+card_slide_from_side):
			$BGContainer/BGImage.position.x += rel_x
		elif $BGContainer/BGImage.position.x >= (center_position.x+card_slide_from_side):
			emit_signal("_swiped", "right")
			queue_free()
		elif $BGContainer/BGImage.position.x <= (center_position.x-card_slide_from_side):
			emit_signal("_swiped", "left")
			queue_free()

The only problem in the debugger is the error:

0:00:06:0695 - Signal '_swiped' is already connected to given method '_print_swipe' in that object.
----------
Type:Error
Description: Signal '_swiped' is already connected to given method '_print_swipe' in that object.
Time: 0:00:06:0695
C Error: Condition ' s->slot_map.has(target) ' is true. returned: ERR_INVALID_PARAMETER
C Source: core/object.cpp:1413
C Function: connect

It happens thousands of time but usually things work fine.
Should I dynamically create a different signal each time?
A bit lost here.
Thanks!