Skip to content

Instantly share code, notes, and snippets.

@renanlage
Last active July 31, 2018 03:21
Show Gist options
  • Save renanlage/968b23ff3e4f5dff068ebfb3acd44a2e to your computer and use it in GitHub Desktop.
Save renanlage/968b23ff3e4f5dff068ebfb3acd44a2e to your computer and use it in GitHub Desktop.
Mata a conexão do listener do Postgrex na marra
{_, port} = \
GenServer.whereis(EventStore.Notifications.Listener.Postgrex)\
|> :sys.get_state()\
|> Map.get(:pid)\
|> :sys.get_state()\
|> Map.get(:mod_state)\
|> Map.get(:protocol)\
|> Map.get(:sock)
:erlang.port_close(port)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment