relayer
relayer copied to clipboard
do not make timeout for reading chan for NIP-5
The timeout may make memory leak of chan since the chan is not pulled out. This may be leak of result set.
Channels are garbage-collected, no? Even if they have stuff in them and are not closed.
Regardless of that, I think removing the timeout is a good idea since these DB-reading operations shouldn't block forever anyway. If they do that's the symptom of a different problem.
This channel has no buffer. Therefore, the transmission of the channel is blocked until the value is retrieved from the channel. Here a timeout may prevent a read from taking place. Then the transmission in the goroutine will be blocked and the rows.Close may not be executed.