Remove unnecesary stop event.
Ignore some write exceptions whe socket is closed.
Print properly port number.
Remove now unused commented code on postgres queue listener loop.
Now finish listener loop when an exception is raised.
Wait to finish all events before close postgresql async connection.